diff options
author | Roger Dingledine <arma@torproject.org> | 2008-12-10 01:46:51 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-12-10 01:46:51 +0000 |
commit | d7bf7e0b3211c3a47f41fbbd519d56a9958d76d1 (patch) | |
tree | aec84083aa76ee7b18dc547b5d735dfb760593e7 /src/or/router.c | |
parent | 4053b47459103489fda6cf328c69220f271db3c5 (diff) | |
download | tor-d7bf7e0b3211c3a47f41fbbd519d56a9958d76d1.tar.gz tor-d7bf7e0b3211c3a47f41fbbd519d56a9958d76d1.zip |
When a directory authority gives us a new guess for our IP address,
log which authority we used. Hopefully this will help us debug
the recent complaints about bad IP address guesses.
svn:r17549
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/or/router.c b/src/or/router.c index c3dc9867de..6b4dbb8304 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1466,7 +1466,8 @@ check_descriptor_bandwidth_changed(time_t now) /** Note at log level severity that our best guess of address has changed from * <b>prev</b> to <b>cur</b>. */ static void -log_addr_has_changed(int severity, uint32_t prev, uint32_t cur) +log_addr_has_changed(int severity, uint32_t prev, uint32_t cur, + const char *source) { char addrbuf_prev[INET_NTOA_BUF_LEN]; char addrbuf_cur[INET_NTOA_BUF_LEN]; @@ -1482,8 +1483,8 @@ log_addr_has_changed(int severity, uint32_t prev, uint32_t cur) if (prev) log_fn(severity, LD_GENERAL, "Our IP Address has changed from %s to %s; " - "rebuilding descriptor.", - addrbuf_prev, addrbuf_cur); + "rebuilding descriptor (source: %s).", + addrbuf_prev, addrbuf_cur, source); else log_notice(LD_GENERAL, "Guessed our IP address as %s.", @@ -1510,7 +1511,7 @@ check_descriptor_ipaddress_changed(time_t now) } if (prev != cur) { - log_addr_has_changed(LOG_INFO, prev, cur); + log_addr_has_changed(LOG_INFO, prev, cur, "resolve"); ip_address_changed(0); } } @@ -1570,7 +1571,8 @@ router_new_address_suggestion(const char *suggestion, control_event_server_status(LOG_NOTICE, "EXTERNAL_ADDRESS ADDRESS=%s METHOD=DIRSERV", suggestion); - log_addr_has_changed(LOG_NOTICE, last_guessed_ip, addr); + log_addr_has_changed(LOG_NOTICE, last_guessed_ip, addr, + d_conn->_base.address); ip_address_changed(0); last_guessed_ip = addr; /* router_rebuild_descriptor() will fetch it */ } |