]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove AuthDirPublishIPv6 and let AuthDirHasIPv6Connectivity fill its function.
authorLinus Nordberg <linus@torproject.org>
Wed, 5 Sep 2012 11:35:39 +0000 (13:35 +0200)
committerLinus Nordberg <linus@torproject.org>
Wed, 5 Sep 2012 11:35:39 +0000 (13:35 +0200)
See #4771 for rationale.

Note that this patch does not take suggested changes in #4470 into
account and keeps treating AuthDirHasIPv6Connectivity as an
AUTOBOOL. Thus, bug fixes for that are included here as well.

This is a fix on master, unreleased as of now.

doc/tor.1.txt
src/or/config.c
src/or/dirserv.c
src/or/or.h

index 5e76105d2baf6a6d91f80bb037139eb42acb17a1..93bde59d3f4acea56f86eee8971d63563a437c2d 100644 (file)
@@ -1749,17 +1749,10 @@ DIRECTORY AUTHORITY SERVER OPTIONS
 
 **AuthDirHasIPv6Connectivity** **0**|**1**|**auto**::
 
-    Authoritative directories only. When set to 0, OR ports with an
-    IPv6 address are being accepted without reachability testing.
-    When set to 1, IPv6 OR ports are being tested just like IPv4 OR
-    ports.  When set to auto, Tor tries to find out if the authority
-    relay has IPv6 connectivity or not. (Default: auto)
-
-**AuthDirPublishIPv6** **0**|**1**::
-
-    Authoritative directories only. When set to 0, Tor will not
-    include IPv6 OR ports in votes. When set to 1, Tor will vote for
-    IPv6 OR ports. (Default: 0).
+    Authoritative directories only. When set to 1, IPv6 OR ports are
+    being tested for reachability and voted on. When set to auto, Tor
+    tries to find out if the authority relay has IPv6 connectivity or
+    not. (Default: auto)
 
 HIDDEN SERVICE OPTIONS
 ----------------------
index f21016d48f0adf714addb9d8ad9dcd7af2b2392b..8c41c7f53dd5d9f4e9102d1249ba92e904f1903a 100644 (file)
@@ -205,7 +205,6 @@ static config_var_t _option_vars[] = {
   V(AuthDirMaxServersPerAddr,    UINT,     "2"),
   V(AuthDirMaxServersPerAuthAddr,UINT,     "5"),
   V(AuthDirHasIPv6Connectivity,  AUTOBOOL, "auto"),
-  V(AuthDirPublishIPv6,          BOOL,     "0"),
   VAR("AuthoritativeDirectory",  BOOL, AuthoritativeDir,    "0"),
   V(AutomapHostsOnResolve,       BOOL,     "0"),
   V(AutomapHostsSuffixes,        CSV,      ".onion,.exit"),
index f229e5995f81c226a0129719a1002ff18c77062d..086db032a44cfa0d12be9ba2b87268e86d33ed93 100644 (file)
@@ -1017,7 +1017,7 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now)
        IPv6 OR port since that'd kill all dual stack relays until a
        majority of the dir auths have IPv6 connectivity. */
     answer = (now < node->last_reachable + REACHABLE_TIMEOUT &&
-              (options->AuthDirHasIPv6Connectivity == 0 ||
+              (options->AuthDirHasIPv6Connectivity != 1 ||
                tor_addr_is_null(&router->ipv6_addr) ||
                now < node->last_reachable6 + REACHABLE_TIMEOUT));
   }
@@ -2495,13 +2495,11 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
   strlcpy(rs->nickname, ri->nickname, sizeof(rs->nickname));
   rs->or_port = ri->or_port;
   rs->dir_port = ri->dir_port;
-  if (options->AuthDirPublishIPv6 == 1 &&
+  if (options->AuthDirHasIPv6Connectivity == 1 &&
       !tor_addr_is_null(&ri->ipv6_addr) &&
-      (options->AuthDirHasIPv6Connectivity == 0 ||
-       node->last_reachable6 >= now - REACHABLE_TIMEOUT)) {
-    /* We're configured for publishing IPv6 OR ports. There's an IPv6
-       OR port and it's reachable (or we know that we're not on IPv6)
-       so copy it to the routerstatus.  */
+      node->last_reachable6 >= now - REACHABLE_TIMEOUT) {
+    /* We're configured as having IPv6 connectivity. There's an IPv6
+       OR port and it's reachable so copy it to the routerstatus.  */
     tor_addr_copy(&rs->ipv6_addr, &ri->ipv6_addr);
     rs->ipv6_orport = ri->ipv6_orport;
   }
index 4bf99e2eaa5c9a7200a2c963b305e5a8ff2d73fb..0b321fde06df6b6d5c914bf11a5fba7c0f0b42e2 100644 (file)
@@ -3324,7 +3324,6 @@ typedef struct {
                                      * number of servers per IP address shared
                                      * with an authority. */
   int AuthDirHasIPv6Connectivity; /**< Autoboolean: are we on IPv6?  */
-  int AuthDirPublishIPv6; /**< Boolean: should we list IPv6 OR ports? */
 
   /** If non-zero, always vote the Fast flag for any relay advertising
    * this amount of capacity or more. */