aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-03-11 11:23:58 -0500
committerNick Mathewson <nickm@torproject.org>2016-03-11 11:23:58 -0500
commita86f78a9f258589b5a0a4323c8e5eb1280dd4c95 (patch)
tree91a1da489616ec8a42d86aab7f9f4c8f7418be73 /src
parentfe0d346a6df3d20f81a90c4cfe4de89046907961 (diff)
parent10330c12346af2b0fff892626295db30b98e6115 (diff)
downloadtor-a86f78a9f258589b5a0a4323c8e5eb1280dd4c95.tar.gz
tor-a86f78a9f258589b5a0a4323c8e5eb1280dd4c95.zip
Merge remote-tracking branch 'teor/bug17153'
Diffstat (limited to 'src')
-rw-r--r--src/or/router.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 80732c9036..68bcf1326e 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 {
@@ -1949,7 +1953,7 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
log_warn(LD_CONFIG,
"Unable to use configured IPv6 address \"%s\" in a "
"descriptor. Skipping it. "
- "Try specifying a globally reachable address explicitly. ",
+ "Try specifying a globally reachable address explicitly.",
tor_addr_to_str(addrbuf, &p->addr, sizeof(addrbuf), 1));
}
}