From: Roger Dingledine Date: Fri, 17 Oct 2003 04:48:20 +0000 (+0000) Subject: catch misconfigured machines that return hostname as fqdn X-Git-Tag: tor-0.0.2pre13~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c563939ef7048749b775d3e2bf5dc26b39161d2;p=thirdparty%2Ftor.git catch misconfigured machines that return hostname as fqdn svn:r610 --- diff --git a/src/or/routers.c b/src/or/routers.c index 292e045b77..121d66bb3b 100644 --- a/src/or/routers.c +++ b/src/or/routers.c @@ -1130,6 +1130,10 @@ int router_rebuild_descriptor(void) { return -1; } address = localhostname; + if(!strchr(address,'.')) { + log_fn(LOG_WARN,"fqdn '%s' has only one element. Misconfigured machine?",address); + return -1; + } } ri = tor_malloc(sizeof(routerinfo_t)); ri->address = tor_strdup(address);