diff options
author | Linus Nordberg <linus@nordberg.se> | 2012-05-11 10:22:45 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2012-07-19 18:21:22 +0200 |
commit | cdef2b181a0a7690736132542fbc5307d5c38955 (patch) | |
tree | d3dd215dbb2b3e754c3179bf2f964cdf067a3bb0 | |
parent | 7c80a4502ce3f0b6d95bf2cee134a89765894b74 (diff) | |
download | tor-cdef2b181a0a7690736132542fbc5307d5c38955.tar tor-cdef2b181a0a7690736132542fbc5307d5c38955.tar.gz |
Rename routers_have_same_or_addr() to reflect the fact that it now checks both OR ports.
-rw-r--r-- | src/or/dirserv.c | 2 | ||||
-rw-r--r-- | src/or/nodelist.c | 3 | ||||
-rw-r--r-- | src/or/routerlist.c | 2 | ||||
-rw-r--r-- | src/or/routerlist.h | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 2d9387ee1..4d6f93d18 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -3356,7 +3356,7 @@ dirserv_should_launch_reachability_test(const routerinfo_t *ri, /* It just came out of hibernation; launch a reachability test */ return 1; } - if (! routers_have_same_or_addr(ri, ri_old)) { + if (! routers_have_same_or_addrs(ri, ri_old)) { /* Address or port changed; launch a reachability test */ return 1; } diff --git a/src/or/nodelist.c b/src/or/nodelist.c index cb9417398..bbbb9ebc3 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -135,8 +135,7 @@ nodelist_replace_routerinfo(routerinfo_t *old, routerinfo_t *new) node = node_get_mutable_by_id(old->cache_info.identity_digest); if (node) { tor_assert(node->ri == old); - /* XXXX prop186 we may have more than one address. */ - if (!routers_have_same_or_addr(old, new)) { + if (!routers_have_same_or_addrs(old, new)) { /* These mustn't carry over when the address and orport change. */ node->last_reachable = node->last_reachable6 = 0; diff --git a/src/or/routerlist.c b/src/or/routerlist.c index cc47299fc..a349a4d0d 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1343,7 +1343,7 @@ mark_all_trusteddirservers_up(void) /** Return true iff r1 and r2 have the same address and OR port. */ int -routers_have_same_or_addr(const routerinfo_t *r1, const routerinfo_t *r2) +routers_have_same_or_addrs(const routerinfo_t *r1, const routerinfo_t *r2) { return r1->addr == r2->addr && r1->or_port == r2->or_port && tor_addr_eq(&r1->ipv6_addr, &r2->ipv6_addr) && diff --git a/src/or/routerlist.h b/src/or/routerlist.h index 8dcc6eb02..e84b0405d 100644 --- a/src/or/routerlist.h +++ b/src/or/routerlist.h @@ -36,7 +36,7 @@ const routerstatus_t *router_pick_trusteddirserver(dirinfo_type_t type, int router_get_my_share_of_directory_requests(double *v2_share_out, double *v3_share_out); void router_reset_status_download_failures(void); -int routers_have_same_or_addr(const routerinfo_t *r1, const routerinfo_t *r2); +int routers_have_same_or_addrs(const routerinfo_t *r1, const routerinfo_t *r2); int router_nickname_is_in_list(const routerinfo_t *router, const char *list); const routerinfo_t *routerlist_find_my_routerinfo(void); const node_t *router_find_exact_exit_enclave(const char *address, |