aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-09-03 10:53:29 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-03 10:53:29 -0400
commitb2473357f214a5459b4d6e166150bd6cb1ac2873 (patch)
tree94e59556a8c5f132d05a96be43ebc8d7d0ae5065 /src
parent5926d9cfccccfca19895522ed7a445626be8cc79 (diff)
downloadtor-b2473357f214a5459b4d6e166150bd6cb1ac2873.tar.gz
tor-b2473357f214a5459b4d6e166150bd6cb1ac2873.zip
Launch reachability tests for routers whose IP or ORPort change
Implements #1899, suggested by Sebastian. Depends on #911 fix.
Diffstat (limited to 'src')
-rw-r--r--src/or/dirserv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 523a92178e..b5c33739b3 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;
}