From 5138a9c3c22fb00b3f6e04058d80f0e6d56aea91 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 10 Feb 2021 11:06:52 -0500 Subject: [PATCH] relay: Don't look at omit flag when building descriptor That comes from 685c4866acf8489c58aca41ec01aa5a53e39220a which added that check correctly except for when we build a descriptor. We already omit the IPv6 address, if we need to, when we encode the descriptor but we need to keep the actual discovered address in the descriptor so we can notice future IP changes and be able to assess that we are not publishable as long as we don't specifically set the omit flag. This lead to also having tor noticing that our IP changed from (no IPv6 in the descriptor) to a discovered one which would trigger every minute. Fixes #40279, #40288 Signed-off-by: David Goulet --- src/feature/relay/router.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 0be3eec1dd..9ef609c72d 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -2101,8 +2101,7 @@ router_build_fresh_unsigned_routerinfo,(routerinfo_t **ri_out)) ri->ipv4_dirport = routerconf_find_dir_port(options, 0); /* Optionally check for an IPv6. We still publish without one. */ - if (!omit_ipv6_on_publish && - relay_find_addr_to_publish(options, AF_INET6, RELAY_FIND_ADDR_NO_FLAG, + if (relay_find_addr_to_publish(options, AF_INET6, RELAY_FIND_ADDR_NO_FLAG, &ri->ipv6_addr)) { ri->ipv6_orport = routerconf_find_or_port(options, AF_INET6); router_check_descriptor_address_consistency(&ri->ipv6_addr); -- 2.11.4.GIT