diff options
author | David Goulet <dgoulet@torproject.org> | 2020-07-06 09:42:10 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-07 10:41:10 -0400 |
commit | 192d367b411019760f92f58adde7592476341d6b (patch) | |
tree | 19a56865b81a4bc6ee41cd6d652059531bc427fa /src/app/config/resolve_addr.h | |
parent | f57ce632fe3d391e62d288c0b8acd0001bf670df (diff) | |
download | tor-192d367b411019760f92f58adde7592476341d6b.tar.gz tor-192d367b411019760f92f58adde7592476341d6b.zip |
addr: New function relay_address_new_suggestion()
This behaves like router_new_address_suggestion() but differs in couple of
ways:
1. It takes a tor_addr_t instead of an address string and supports both
AF_INET and AF_INET6.
2. It does _not_ use the last_guessed_ip local cache and instead only relies
on the last resolved address cache in resolve_addr.c
It is not used at this commit. This function is made to process a suggested
address found in a NETINFO cell exactly like router_new_address_suggestion()
does with the address a directory suggests us.
Related to #40022
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/app/config/resolve_addr.h')
-rw-r--r-- | src/app/config/resolve_addr.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/app/config/resolve_addr.h b/src/app/config/resolve_addr.h index 055d59a8f1..7ba70541a5 100644 --- a/src/app/config/resolve_addr.h +++ b/src/app/config/resolve_addr.h @@ -20,6 +20,9 @@ void resolved_addr_reset_last(int family); void resolved_addr_set_last(const tor_addr_t *addr, const char *method_used, const char *hostname_used); +void resolved_addr_get_suggested(int family, tor_addr_t *addr_out); +void resolved_addr_set_suggested(const tor_addr_t *addr); + MOCK_DECL(bool, is_local_to_resolve_addr, (const tor_addr_t *addr)); #ifdef RESOLVE_ADDR_PRIVATE |