]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
catch misconfigured machines that return hostname as fqdn
authorRoger Dingledine <arma@torproject.org>
Fri, 17 Oct 2003 04:48:20 +0000 (04:48 +0000)
committerRoger Dingledine <arma@torproject.org>
Fri, 17 Oct 2003 04:48:20 +0000 (04:48 +0000)
svn:r610

src/or/routers.c

index 292e045b77532b892d589892415ea91fa3ee8ae9..121d66bb3b34a519aab0874fe94cb3b285f609e8 100644 (file)
@@ -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);