]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Launch reachability tests for routers whose IP or ORPort change
authorNick Mathewson <nickm@torproject.org>
Fri, 3 Sep 2010 14:53:29 +0000 (10:53 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 3 Sep 2010 14:53:29 +0000 (10:53 -0400)
Implements #1899, suggested by Sebastian.  Depends on #911 fix.

changes/bug1899_test_changed_addr [new file with mode: 0644]
src/or/dirserv.c

diff --git a/changes/bug1899_test_changed_addr b/changes/bug1899_test_changed_addr
new file mode 100644 (file)
index 0000000..2823d3c
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor features
+    - When a router changes IP or port, authorities now launch a new
+      reachability test for it.  (Implements ticket 1899)
+
index 523a92178e23c2ab13b8d19ca400b12819dd2a7f..b5c33739b3cfbc5e9e585d0e1933e05f29bdf686 100644 (file)
@@ -3136,6 +3136,10 @@ dirserv_should_launch_reachability_test(routerinfo_t *ri, routerinfo_t *ri_old)
     /* It just came out of hibernation; launch a reachability test */
     return 1;
   }
+  if (ri_old->addr != ri->addr || ri_old->or_port != ri->or_port) {
+    /* Address or port changed; launch a reachability test */
+    return 1;
+  }
   return 0;
 }