[or-cvs] catch misconfigured machines that return hostname as fqdn
Roger Dingledine
arma at seul.org
Fri Oct 17 04:48:32 UTC 2003
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
routers.c
Log Message:
catch misconfigured machines that return hostname as fqdn
Index: routers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routers.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- routers.c 10 Oct 2003 01:48:32 -0000 1.79
+++ routers.c 17 Oct 2003 04:48:20 -0000 1.80
@@ -1130,6 +1130,10 @@
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);
More information about the tor-commits
mailing list