aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature/relay')
-rw-r--r--src/feature/relay/relay_find_addr.c15
-rw-r--r--src/feature/relay/relay_find_addr.h2
2 files changed, 2 insertions, 15 deletions
diff --git a/src/feature/relay/relay_find_addr.c b/src/feature/relay/relay_find_addr.c
index 2a3f602438..c43885af51 100644
--- a/src/feature/relay/relay_find_addr.c
+++ b/src/feature/relay/relay_find_addr.c
@@ -162,7 +162,8 @@ relay_find_addr_to_publish, (const or_options_t *options, int family,
"explicit address or set Address.",
fmt_af_family(family),
routerconf_find_or_port(options, family),
- fmt_af_family(family));
+ (family == AF_INET) ? fmt_af_family(AF_INET6) :
+ fmt_af_family(AF_INET));
/* Not found. */
return false;
@@ -171,18 +172,6 @@ relay_find_addr_to_publish, (const or_options_t *options, int family,
return true;
}
-/** Return true iff this relay has an address set for the given family.
- *
- * This only checks the caches so it will not trigger a full discovery of the
- * address. */
-bool
-relay_has_address_set(int family)
-{
- tor_addr_t addr;
- return relay_find_addr_to_publish(get_options(), family,
- RELAY_FIND_ADDR_CACHE_ONLY, &addr);
-}
-
/** How often should we launch a circuit to an authority to be sure of getting
* a guess for our IP? */
#define DUMMY_DOWNLOAD_INTERVAL (20*60)
diff --git a/src/feature/relay/relay_find_addr.h b/src/feature/relay/relay_find_addr.h
index 34890cd34e..f049d1bd20 100644
--- a/src/feature/relay/relay_find_addr.h
+++ b/src/feature/relay/relay_find_addr.h
@@ -22,8 +22,6 @@ MOCK_DECL(bool, relay_find_addr_to_publish,
(const or_options_t *options, int family, int flags,
tor_addr_t *addr_out));
-bool relay_has_address_set(int family);
-
void relay_addr_learn_from_dirauth(void);
#ifdef RELAY_FIND_ADDR_PRIVATE