diff options
author | David Goulet <dgoulet@torproject.org> | 2020-07-17 11:10:56 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-20 14:54:13 -0400 |
commit | 75434a1df18e3007c286ce48a1e981a4e96e3f82 (patch) | |
tree | 7278a53e948a351ab55b2afe76c1eb8db25943ae /src/feature/relay/router.c | |
parent | 230293c169f73923b290598a1df4872acf1dee68 (diff) | |
download | tor-75434a1df18e3007c286ce48a1e981a4e96e3f82.tar.gz tor-75434a1df18e3007c286ce48a1e981a4e96e3f82.zip |
relay: Use flags in relay_find_addr_to_publish()
Instead of a boolean saying "cache_only" add the concept of flags so we add
semantic through out the code and allow ourselves to have more options in the
future.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/relay/router.c')
-rw-r--r-- | src/feature/relay/router.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 039aeb7343..b75241160f 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -2040,9 +2040,11 @@ router_build_fresh_unsigned_routerinfo,(routerinfo_t **ri_out)) /* Find our resolved address both IPv4 and IPv6. In case the address is not * found, the object is set to an UNSPEC address. */ - bool have_v4 = relay_find_addr_to_publish(options, AF_INET, false, + bool have_v4 = relay_find_addr_to_publish(options, AF_INET, + RELAY_FIND_ADDR_NO_FLAG, &ipv4_addr); - bool have_v6 = relay_find_addr_to_publish(options, AF_INET6, false, + bool have_v6 = relay_find_addr_to_publish(options, AF_INET6, + RELAY_FIND_ADDR_NO_FLAG, &ipv6_addr); /* Tor requires a relay to have an IPv4 so bail if we can't find it. */ |