[tor-commits] [tor/release-0.4.5] relay: Don't look at omit flag when building descriptor

dgoulet at torproject.org dgoulet at torproject.org
Fri Feb 12 17:57:46 UTC 2021


commit 5138a9c3c22fb00b3f6e04058d80f0e6d56aea91
Author: David Goulet <dgoulet at torproject.org>
Date:   Wed Feb 10 11:06:52 2021 -0500

    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 at torproject.org>
---
 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);





More information about the tor-commits mailing list