diff options
author | David Goulet <dgoulet@torproject.org> | 2020-07-14 12:58:36 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-20 14:54:13 -0400 |
commit | 1a347b4790719d6ae1576c0b023dac343b65e5a1 (patch) | |
tree | 3e7f6ef4018caa7947a4d31d439801b0be94aa53 /src/feature/relay/relay_find_addr.h | |
parent | 35871e46e89ae0182703b2e20fe9e9c1e0f20cef (diff) | |
download | tor-1a347b4790719d6ae1576c0b023dac343b65e5a1.tar.gz tor-1a347b4790719d6ae1576c0b023dac343b65e5a1.zip |
relay: Deciding to fetch from authority, use new find address API
Use the new relay_has_address_set() interface when deciding if we need to
fetch directory information from an authority as a relay.
If no IPv4 address is found, we'll proceed with a fetch so we can learn our
address in the HTTP header or NETINFO cell that a trusted authority will send
us back.
Related to #40025
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/relay/relay_find_addr.h')
-rw-r--r-- | src/feature/relay/relay_find_addr.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feature/relay/relay_find_addr.h b/src/feature/relay/relay_find_addr.h index e28ceb933a..399ac8dc44 100644 --- a/src/feature/relay/relay_find_addr.h +++ b/src/feature/relay/relay_find_addr.h @@ -22,6 +22,8 @@ void relay_address_new_suggestion(const tor_addr_t *suggested_addr, bool relay_find_addr_to_publish(const or_options_t *options, int family, bool cache_only, tor_addr_t *addr_out); +bool relay_has_address_set(int family); + #ifdef RELAY_FIND_ADDR_PRIVATE #endif /* RELAY_FIND_ADDR_PRIVATE */ |