summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2011-02-07 16:31:20 +0100
committerSebastian Hahn <sebastian@torproject.org>2011-02-08 00:38:48 +0100
commit9b64227ffd38e9406c5c88ace137a0eae010771d (patch)
treeb533ef2a0ef94cbc9329a0261ea516dac6f9f9d3 /src/or/dirserv.c
parenta68e2043aba4d33e39a8cb47be5dc3082f27ad07 (diff)
downloadtor-9b64227ffd38e9406c5c88ace137a0eae010771d.tar.gz
tor-9b64227ffd38e9406c5c88ace137a0eae010771d.zip
Routers count as down when they change ORPort, too
rransom noticed that a change of ORPort is just as bad as a change of IP address from a client's perspective, because both mean that the relay is not available to them while the new information hasn't propagated. Change the bug1035 fix accordingly. Also make sure we don't log a bridge's IP address (which might happen when we are the bridge authority).
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 52e59cd9d1..f426881440 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -3118,11 +3118,13 @@ dirserv_orconn_tls_done(const char *address,
/* correct digest. mark this router reachable! */
if (!bridge_auth || ri->purpose == ROUTER_PURPOSE_BRIDGE) {
tor_addr_t addr, *addrp=NULL;
- log_info(LD_DIRSERV, "Found router %s to be reachable at %s. Yay.",
- ri->nickname, address);
+ log_info(LD_DIRSERV, "Found router %s to be reachable at %s:%d. Yay.",
+ ri->nickname, address, ri->or_port );
if (tor_addr_from_str(&addr, ri->address) != -1)
addrp = &addr;
- rep_hist_note_router_reachable(digest_rcvd, addrp, now);
+ else
+ log_warn(LD_BUG, "Couldn't parse IP address \"%s\"", ri->address);
+ rep_hist_note_router_reachable(digest_rcvd, addrp, or_port, now);
ri->last_reachable = now;
}
}