diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-07-23 12:36:40 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-07-23 12:36:40 -0400 |
commit | f14ce4bce6cb1772ce4dbba79acbed27b3a40b31 (patch) | |
tree | 86e05fa95371137d8b000b7a51ef5ed104c3785b /src/feature/hs | |
parent | f2b1eb1f052c99e0be096b98888e9854cf57a64c (diff) | |
download | tor-f14ce4bce6cb1772ce4dbba79acbed27b3a40b31.tar.gz tor-f14ce4bce6cb1772ce4dbba79acbed27b3a40b31.zip |
Allow NULL circ->p_chan in circuit_is_suitable_for_introduce1()
This shouldn't be possible while Tor is running, but the tests can
hit this code. Rather than force the tests to add a dummy channel
object, let's just tolerate their incompletely built circuits.
Diffstat (limited to 'src/feature/hs')
-rw-r--r-- | src/feature/hs/hs_intropoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/hs/hs_intropoint.c b/src/feature/hs/hs_intropoint.c index 447f73b602..6383d3ed22 100644 --- a/src/feature/hs/hs_intropoint.c +++ b/src/feature/hs/hs_intropoint.c @@ -548,7 +548,7 @@ circuit_is_suitable_for_introduce1(const or_circuit_t *circ) } /* Disallow single hop client circuit. */ - if (channel_is_client(circ->p_chan)) { + if (circ->p_chan && channel_is_client(circ->p_chan)) { log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL, "Single hop client was rejected while trying to introduce. " "Closing circuit."); |