mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix some #5040 bugs found by Nick's tests.
- Set conn->address when we receive a USERADDR command. - Set conn->state to a sane value when we transition from Extended ORPort to ORPort.
This commit is contained in:
committed by
Nick Mathewson
parent
f549e4c36d
commit
794447d03d
@@ -505,10 +505,7 @@ test_ext_or_handshake(void *arg)
|
||||
tt_int_op(is_reading,==,1);
|
||||
tt_int_op(handshake_start_called,==,1);
|
||||
tt_int_op(TO_CONN(conn)->type, ==, CONN_TYPE_OR);
|
||||
/* XXXXX the state is now nonsensical! It should be set to something
|
||||
* neutral (zero?) before we connection_or_change_state; right now
|
||||
* it's EXT_OR_CONN_STATE_FLUSHING */
|
||||
/* tt_int_op(TO_CONN(conn)->state, ==, 0); XXXX */
|
||||
tt_int_op(TO_CONN(conn)->state, ==, 0);
|
||||
|
||||
done:
|
||||
UNMOCK(connection_write_to_buf_impl_);
|
||||
|
||||
Reference in New Issue
Block a user