[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Allow internal IPv6 addresses in descriptors in private networks
commit 2120e140093484725ccb7221fa117e2c18795c4b
Author: teor (Tim Wilson-Brown) <teor2345@xxxxxxxxx>
Date: Tue Mar 1 16:41:52 2016 +0100
Allow internal IPv6 addresses in descriptors in private networks
---
changes/bug17153 | 4 ++++
src/or/router.c | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/changes/bug17153 b/changes/bug17153
new file mode 100644
index 0000000..15a53c1
--- /dev/null
+++ b/changes/bug17153
@@ -0,0 +1,4 @@
+ o Minor bugfixes (test networks, IPv6):
+ - Allow internal IPv6 addresses in descriptors in test networks.
+ Fixes bug 17153; bugfix on 6b4af1071 in 0.2.3.16-alpha.
+ Patch by "teor", reported by "karsten".
diff --git a/src/or/router.c b/src/or/router.c
index 80732c9..60b03c0 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 {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits