diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-06-28 11:41:50 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-06-29 09:57:00 -0400 |
commit | 665baf5ed5c6186d973c46cdea165c0548027350 (patch) | |
tree | b079326e84dd888dcea50f7192e5ccf319579f48 /src/or/nodelist.c | |
parent | a242d194c74b318b8ee4b347efd09ed13d0d2549 (diff) | |
download | tor-665baf5ed5c6186d973c46cdea165c0548027350.tar.gz tor-665baf5ed5c6186d973c46cdea165c0548027350.zip |
Consider the exit family when applying guard restrictions.
When the new path selection logic went into place, I accidentally
dropped the code that considered the _family_ of the exit node when
deciding if the guard was usable, and we didn't catch that during
code review.
This patch makes the guard_restriction_t code consider the exit
family as well, and adds some (hopefully redundant) checks for the
case where we lack a node_t for a guard but we have a bridge_info_t
for it.
Fixes bug 22753; bugfix on 0.3.0.1-alpha. Tracked as TROVE-2016-006
and CVE-2017-0377.
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 96e95baf5a..2ca52e74b5 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -1343,7 +1343,7 @@ nodelist_refresh_countries(void) /** Return true iff router1 and router2 have similar enough network addresses * that we should treat them as being in the same family */ -static inline int +int addrs_in_same_network_family(const tor_addr_t *a1, const tor_addr_t *a2) { |