diff options
author | Roger Dingledine <arma@torproject.org> | 2010-10-01 13:32:38 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2010-10-01 13:32:38 -0400 |
commit | 6cb5383e564f37e681df922ffddc1894bf8b35fa (patch) | |
tree | f8410b8894cd624171ddc6fcaa4b50700f06bee5 /src/or/router.c | |
parent | 6e00877fa352cca9cc0a6e2088b3525fdced10ee (diff) | |
download | tor-6cb5383e564f37e681df922ffddc1894bf8b35fa.tar.gz tor-6cb5383e564f37e681df922ffddc1894bf8b35fa.zip |
log when we guess our ip address, not just when we fail
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c index 621cbaace5..56d88262d6 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1257,6 +1257,8 @@ static int router_guess_address_from_dir_headers(uint32_t *guess); int router_pick_published_address(or_options_t *options, uint32_t *addr) { + char buf[INET_NTOA_BUF_LEN]; + struct in_addr a; if (resolve_my_address(LOG_INFO, options, addr, NULL) < 0) { log_info(LD_CONFIG, "Could not determine our address locally. " "Checking if directory headers provide any hints."); @@ -1266,6 +1268,9 @@ router_pick_published_address(or_options_t *options, uint32_t *addr) return -1; } } + a.s_addr = htonl(*addr); + tor_inet_ntoa(&a, buf, sizeof(buf)); + log_info(LD_CONFIG,"Success: chose address '%s'.", buf); return 0; } |