From 35a856a1e1cf4ff0f68ca17a0be1f9b928ebcf9c Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Fri, 17 Oct 2003 04:48:20 +0000 Subject: [PATCH] catch misconfigured machines that return hostname as fqdn svn:r610 --- trunk/src/or/routers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trunk/src/or/routers.c b/trunk/src/or/routers.c index 292e045b77..121d66bb3b 100644 --- a/trunk/src/or/routers.c +++ b/trunk/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);