Commit 5c563939 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

catch misconfigured machines that return hostname as fqdn


svn:r610
parent 25b0c92f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);