diff options
author | Andrea Shepard <andrea@torproject.org> | 2014-09-05 11:08:46 -0700 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2014-09-05 11:12:08 -0700 |
commit | 39a017809b6e7f8f779cfa0b4ebea3c0209bef0c (patch) | |
tree | f8c9334acf8e44c59204d871b353a32b0601a7be /src/or/channel.c | |
parent | dcb4ee5b83b69234ef8fd0fce8533ab1c4434bd9 (diff) | |
download | tor-39a017809b6e7f8f779cfa0b4ebea3c0209bef0c.tar.gz tor-39a017809b6e7f8f779cfa0b4ebea3c0209bef0c.zip |
Correctly update channel local mark when address of incoming connection changes after handshake; fixes bug #12160
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index ffd68493d0..b2b670e4fb 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -3760,6 +3760,23 @@ channel_mark_local(channel_t *chan) } /** + * Mark a channel as remote + * + * This internal-only function should be called by the lower layer if the + * channel is not to a local address but has previously been marked local. + * See channel_is_local() above or the description of the is_local bit in + * channel.h + */ + +void +channel_mark_remote(channel_t *chan) +{ + tor_assert(chan); + + chan->is_local = 0; +} + +/** * Test outgoing flag * * This function gets the outgoing flag; this is the inverse of the incoming |