diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-07-30 19:12:03 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-07-30 19:12:03 +0000 |
commit | ac5893c62675ac0f25538c5b231dd3cd287eb4d9 (patch) | |
tree | f959e277ee907e9768b1b8c8c67034839948fb13 /src/or/routers.c | |
parent | f12fdd62aa9ac5561dc2133a2110c3f9dd42900c (diff) | |
download | tor-ac5893c62675ac0f25538c5b231dd3cd287eb4d9.tar.gz tor-ac5893c62675ac0f25538c5b231dd3cd287eb4d9.zip |
src/or
svn:r371
Diffstat (limited to 'src/or/routers.c')
-rw-r--r-- | src/or/routers.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/routers.c b/src/or/routers.c index 06d7e2c793..f4d059d9cc 100644 --- a/src/or/routers.c +++ b/src/or/routers.c @@ -58,7 +58,11 @@ int learn_my_address(struct sockaddr_in *me) { memcpy((void *)&me->sin_addr,(void *)localhost->h_addr,sizeof(struct in_addr)); me->sin_port = htons(options.ORPort); log_fn(LOG_DEBUG,"chose address as '%s'.",inet_ntoa(me->sin_addr)); - + if (!strncmp("127.",inet_ntoa(me->sin_addr), 4) && + strcasecmp(localhostname, "localhost")) { + /* We're a loopback IP but we're not called localhost. Uh oh! */ + log_fn(LOG_WARNING, "Got a loopback address: /etc/hosts may be wrong"); + } return 0; } |