diff options
author | David Goulet <dgoulet@torproject.org> | 2020-06-30 13:46:53 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-06-30 13:48:22 -0400 |
commit | 2ac2ba4e2c67a5c3266656c6ad525eb2c056da79 (patch) | |
tree | 1514f752b14f5551d9094b9b564d5b1b2d14e5b9 /src/feature/client/entrynodes.c | |
parent | 7a6e1f2491094fbf705e2ef4b3fd770faf48f1b7 (diff) | |
download | tor-2ac2ba4e2c67a5c3266656c6ad525eb2c056da79.tar.gz tor-2ac2ba4e2c67a5c3266656c6ad525eb2c056da79.zip |
node: Rename addrs_in_same_network_family()
New name reflects that the function is only used to compare router addresses
in order to learn if they are in the same network.
The network check is /16 and /32 respectively for IPv4 and IPv6.
Related to #40009
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/client/entrynodes.c')
-rw-r--r-- | src/feature/client/entrynodes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/client/entrynodes.c b/src/feature/client/entrynodes.c index 223815e7b2..6e8259142d 100644 --- a/src/feature/client/entrynodes.c +++ b/src/feature/client/entrynodes.c @@ -1554,7 +1554,7 @@ guard_in_node_family(const entry_guard_t *guard, const node_t *node) if (get_options()->EnforceDistinctSubnets && guard->bridge_addr) { tor_addr_t node_addr; node_get_addr(node, &node_addr); - if (addrs_in_same_network_family(&node_addr, + if (router_addrs_in_same_network(&node_addr, &guard->bridge_addr->addr)) { return 1; } |