minimal (i think) backport of r17625

svn:r17626
This commit is contained in:
Roger Dingledine 2008-12-14 20:02:00 +00:00
parent 746980bba7
commit c41a27ecec
2 changed files with 15 additions and 1 deletions

View File

@ -1,4 +1,12 @@
Changes in version 0.2.0.33 - 200?-??-??
o Major bugfixes:
- When a stream at an exit relay is in state "resolving" or
"connecting" and it receives an "end" relay cell, the exit relay
would silently ignore the end cell and not close the stream. If
the client never closes the circuit, then the exit relay never
closes the TCP connection. Bug introduced in Tor 0.1.2.1-alpha;
reported by "wood".
o Minor bugfixes:
- Do not mark smartlist_bsearch_idx() function as ATTR_PURE. This bug
could make gcc generate non-functional binary search code. Bugfix

View File

@ -890,8 +890,14 @@ connection_edge_process_relay_cell_not_open(
return connection_edge_process_end_not_open(rh, cell,
TO_ORIGIN_CIRCUIT(circ), conn,
layer_hint);
else
else {
/* we just got an 'end', don't need to send one */
conn->_base.edge_has_sent_end = 1;
conn->end_reason = *(cell->payload+RELAY_HEADER_SIZE) |
END_STREAM_REASON_FLAG_REMOTE;
connection_mark_for_close(TO_CONN(conn));
return 0;
}
}
if (conn->_base.type == CONN_TYPE_AP &&