aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 80732c9036..60b03c0b54 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1941,7 +1941,11 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
! p->server_cfg.no_advertise &&
! p->server_cfg.bind_ipv4_only &&
tor_addr_family(&p->addr) == AF_INET6) {
- if (! tor_addr_is_internal(&p->addr, 0)) {
+ /* Like IPv4, if the relay is configured using the default
+ * authorities, disallow internal IPs. Otherwise, allow them. */
+ const int default_auth = (!options->DirAuthorities &&
+ !options->AlternateDirAuthority);
+ if (! tor_addr_is_internal(&p->addr, 0) || ! default_auth) {
ipv6_orport = p;
break;
} else {