aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-11-26 19:22:25 +0000
committerNick Mathewson <nickm@torproject.org>2006-11-26 19:22:25 +0000
commit116ae04c2dfb4117ccc98382fd3e2b157c1113ac (patch)
tree457557c1b83dd083ed468fa51426c1b543a0c0b0 /src/or
parent68142b18cd0020df68378850258c38c28231c15b (diff)
downloadtor-116ae04c2dfb4117ccc98382fd3e2b157c1113ac.tar
tor-116ae04c2dfb4117ccc98382fd3e2b157c1113ac.tar.gz
r9399@totoro: nickm | 2006-11-26 14:22:17 -0500
Actually, clients *should* try to guess their addresses. svn:r8997
Diffstat (limited to 'src/or')
-rw-r--r--src/or/router.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 8c686441c..535be80dc 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1022,15 +1022,15 @@ router_new_address_suggestion(const char *suggestion)
log_debug(LD_DIR, "Got X-Your-Address-Is: %s.", suggestion);
- if (!server_mode(options))
- return;
-
if (resolve_my_address(LOG_INFO, options, &cur, NULL) >= 0) {
/* We're all set -- we already know our address. Great. */
last_guessed_ip = cur; /* store it in case we need it later */
return;
}
+ if (!server_mode(options))
+ return;
+
if (last_guessed_ip != addr) {
log_addr_has_changed(LOG_NOTICE, last_guessed_ip, addr);
server_has_changed_ip();