[or-cvs] [tor/master 7/9] Launch reachability tests for routers whose IP or ORPort change

nickm at torproject.org nickm at torproject.org
Wed Sep 15 02:17:39 UTC 2010


Author: Nick Mathewson <nickm at torproject.org>
Date: Fri, 3 Sep 2010 10:53:29 -0400
Subject: Launch reachability tests for routers whose IP or ORPort change
Commit: b2473357f214a5459b4d6e166150bd6cb1ac2873

Implements #1899, suggested by Sebastian.  Depends on #911 fix.
---
 changes/bug1899_test_changed_addr |    4 ++++
 src/or/dirserv.c                  |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
 create mode 100644 changes/bug1899_test_changed_addr

diff --git a/changes/bug1899_test_changed_addr b/changes/bug1899_test_changed_addr
new file mode 100644
index 0000000..2823d3c
--- /dev/null
+++ b/changes/bug1899_test_changed_addr
@@ -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)
+
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 523a921..b5c3373 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -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;
 }
 
-- 
1.7.1




More information about the tor-commits mailing list