diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-22 14:57:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-22 14:57:58 -0400 |
commit | 2e1f23151c5154b63ad1a533a2d51a1b8ecbd6ad (patch) | |
tree | 4b33b4383960674b481184d394fb92597eba3425 | |
parent | ebb95d0f781e21a694a8de386ed0b75984b247d4 (diff) | |
download | tor-2e1f23151c5154b63ad1a533a2d51a1b8ecbd6ad.tar tor-2e1f23151c5154b63ad1a533a2d51a1b8ecbd6ad.tar.gz |
count DATA cells with stream ID 0 as delivered for SENDME purposes
Found while investigating 8093, but probably not the cause of it,
since this bug would result in us sending too few SENDMEs, not in us
receiving SENDMEs unexpectedly.
Bugfix on the fix for 7889, which has appeared in 0.2.4.10-alpha, but
not yet in any released 0.2.3.x version.
-rw-r--r-- | changes/not_bug_8093 | 5 | ||||
-rw-r--r-- | src/or/relay.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/changes/not_bug_8093 b/changes/not_bug_8093 new file mode 100644 index 000000000..1f7236347 --- /dev/null +++ b/changes/not_bug_8093 @@ -0,0 +1,5 @@ + o Minor bugfixes: + - When rejecting DATA cells for stream_id zero, still count them against + the circuit's deliver window so that we don't get fail to send a + SENDME. Fix related to but probably not the cause of bug 8093; bugfix + on 0.2.4.10-alpha. diff --git a/src/or/relay.c b/src/or/relay.c index a17c33331..f565f9274 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -1050,7 +1050,6 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, switch (rh.command) { case RELAY_COMMAND_BEGIN: case RELAY_COMMAND_CONNECTED: - case RELAY_COMMAND_DATA: case RELAY_COMMAND_END: case RELAY_COMMAND_RESOLVE: case RELAY_COMMAND_RESOLVED: @@ -1135,7 +1134,11 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, circuit_consider_sending_sendme(circ, layer_hint); - if (!conn) { + if (rh.stream_id == 0) { + log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL, "Relay data cell with zero " + "stream_id. Dropping."); + return 0; + } else if (!conn) { log_info(domain,"data cell dropped, unknown stream (streamid %d).", rh.stream_id); return 0; |