]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Actually advertise IPv6 exit policies.
authorNick Mathewson <nickm@torproject.org>
Tue, 6 Nov 2012 16:29:41 +0000 (11:29 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 15 Nov 2012 04:16:40 +0000 (23:16 -0500)
I have a theory that my tests will work better if the code I'm testing
isn't disabled.

src/or/router.c

index a0950bec63c7f91aacbd8b2387e5f18eff223a7a..f51b74e1123ceaae0a985b305bd0a748d86b7361 100644 (file)
@@ -1622,11 +1622,13 @@ router_rebuild_descriptor(int force)
   }
   ri->policy_is_reject_star =
     policy_is_reject_star(ri->exit_policy);
-#if 0
-  /* XXXX024 Don't actually enable this code until exiting to an IPv6
-   * address works. */
-  ri->ipv6_exit_policy = policy_summarize(&ri->exit_policy, AF_INET6);
-#endif
+
+  if (options->IPv6Exit) {
+    char *p_tmp = policy_summarize(ri->exit_policy, AF_INET6);
+    if (p_tmp)
+      ri->ipv6_exit_policy = parse_short_policy(p_tmp);
+    tor_free(p_tmp);
+  }
 
 #if 0
   /* XXXX NM NM I belive this is safe to remove */