aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/dirlist.c
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-12-20 14:31:49 +1000
committerDavid Goulet <dgoulet@torproject.org>2020-07-02 07:09:02 -0400
commit1f58b0ca262f16c76b25c8cb39250f14a1ab4fc1 (patch)
tree500ba82cdcde0f35d9532773de370c3c11f709bf /src/feature/nodelist/dirlist.c
parent538b25241e9f2112e3a56449ba07c08f265f22f9 (diff)
downloadtor-1f58b0ca262f16c76b25c8cb39250f14a1ab4fc1.tar.gz
tor-1f58b0ca262f16c76b25c8cb39250f14a1ab4fc1.zip
router: Authorities add their own IPv6 to trusted dir servers
Authorities currently add themselves to the trusted dir servers list, but if they have an IPv6 ORPort, they leave it out. This commit makes authorities add their own IPv6 ORPort to the trusted dir servers list. Closes ticket 32822.
Diffstat (limited to 'src/feature/nodelist/dirlist.c')
-rw-r--r--src/feature/nodelist/dirlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/nodelist/dirlist.c b/src/feature/nodelist/dirlist.c
index f49d991f9b..bd647ab530 100644
--- a/src/feature/nodelist/dirlist.c
+++ b/src/feature/nodelist/dirlist.c
@@ -294,7 +294,7 @@ dir_server_new(int is_authority,
ent->is_authority = is_authority;
ent->type = type;
ent->weight = weight;
- if (addrport_ipv6) {
+ if (addrport_ipv6 && tor_addr_port_is_valid_ap(addrport_ipv6, 0)) {
if (tor_addr_family(&addrport_ipv6->addr) != AF_INET6) {
log_warn(LD_BUG, "Hey, I got a non-ipv6 addr as addrport_ipv6.");
tor_addr_make_unspec(&ent->ipv6_addr);