diff options
author | Roger Dingledine <arma@torproject.org> | 2005-11-17 03:40:20 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-11-17 03:40:20 +0000 |
commit | af86345b74f6c5112a0dacafd99898f9977c58c9 (patch) | |
tree | c45dc8eddf9b20ed8761fd1705526111b6a78b8a /src | |
parent | 6f060797414a4b89d64c53bf83f11674a212bcaf (diff) | |
download | tor-af86345b74f6c5112a0dacafd99898f9977c58c9.tar tor-af86345b74f6c5112a0dacafd99898f9977c58c9.tar.gz |
we used to kill the circuit when we receive a relay command we
don't recognize. now we just drop it. perhaps this will make us
more forward-compatible? or perhaps it will bite us? one day we
will find out.
svn:r5405
Diffstat (limited to 'src')
-rw-r--r-- | src/or/relay.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index f933ceb91..a8d0b087d 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -798,11 +798,12 @@ connection_edge_process_relay_cell_not_open( } log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL, - "Got an unexpected relay command %d, in state %d (%s). Closing.", + "Got an unexpected relay command %d, in state %d (%s). Dropping.", rh->command, conn->state, conn_state_to_string(conn->type, conn->state)); - connection_edge_end(conn, END_STREAM_REASON_TORPROTOCOL, conn->cpath_layer); - connection_mark_for_close(conn); - return -1; + return 0; /* for forward compatibility, don't kill the circuit */ +// connection_edge_end(conn, END_STREAM_REASON_TORPROTOCOL, conn->cpath_layer); +// connection_mark_for_close(conn); +// return -1; } /** An incoming relay cell has arrived on circuit <b>circ</b>. If @@ -1035,8 +1036,10 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, cell->payload+RELAY_HEADER_SIZE); return 0; } - warn(LD_PROTOCOL,"unknown relay command %d.",rh.command); - return -1; + log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL, + "Received unknown relay command %d. Perhaps the other side is using a newer version of Tor? Dropping.", + rh.command); + return 0; /* for forward compatibility, don't kill the circuit */ } uint64_t stats_n_data_cells_packaged = 0; |