[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] catch misconfigured machines that return hostname as fqdn
- To: or-cvs@freehaven.net
- Subject: [or-cvs] catch misconfigured machines that return hostname as fqdn
- From: arma@seul.org (Roger Dingledine)
- Date: Fri, 17 Oct 2003 00:48:32 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 17 Oct 2003 00:53:24 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
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);