summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-11-26 20:01:45 +0000
committerRoger Dingledine <arma@torproject.org>2006-11-26 20:01:45 +0000
commitab68e312bd22a6089c6303426bfeb0384c45e94e (patch)
tree332926c5b3d785ed8db59b15ff07af64b2a68d95
parent116ae04c2dfb4117ccc98382fd3e2b157c1113ac (diff)
downloadtor-ab68e312bd22a6089c6303426bfeb0384c45e94e.tar.gz
tor-ab68e312bd22a6089c6303426bfeb0384c45e94e.zip
actually, i think this fix was closest to what i originally
intended. this way we don't call resolve-my-address, which yells and screams if we're using an internal address (mere clients should not have to care). svn:r8998
-rw-r--r--src/or/router.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 535be80dc0..66f1f672ca 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1022,15 +1022,17 @@ router_new_address_suggestion(const char *suggestion)
log_debug(LD_DIR, "Got X-Your-Address-Is: %s.", suggestion);
+ if (!server_mode(options)) {
+ last_guessed_ip = addr; /* store it in case we need it later */
+ 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();