aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c
index b0a3c5fef..409dcf29b 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1034,7 +1034,14 @@ router_new_address_suggestion(const char *suggestion)
last_guessed_ip = cur; /* store it in case we need it later */
return;
}
+ if (is_internal_IP(addr, 0)) {
+ /* Don't believe anybody who says our IP is, say, 127.0.0.1. */
+ return;
+ }
+ /* Okay. We can't resolve our own address, and X-Your-Address-Is is giving
+ * us an answer different from what we had the last time we managed to
+ * resolve it. */
if (last_guessed_ip != addr) {
log_addr_has_changed(LOG_NOTICE, last_guessed_ip, addr);
server_has_changed_ip();