summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-02-10 11:06:52 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-02-10 11:47:17 -0500
commit5138a9c3c22fb00b3f6e04058d80f0e6d56aea91 (patch)
tree6d327938b01f16af8a0f7bff70c85270f1fb6144
parent758000aa98432414847393420324fef983c66f1e (diff)
downloadtor-5138a9c3c22fb00b3f6e04058d80f0e6d56aea91.tar.gz
tor-5138a9c3c22fb00b3f6e04058d80f0e6d56aea91.zip
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 <nothing> (no IPv6 in the descriptor) to a discovered one which would trigger every minute. Fixes #40279, #40288 Signed-off-by: David Goulet <dgoulet@torproject.org>
-rw-r--r--src/feature/relay/router.c3
1 files changed, 1 insertions, 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);