[or-cvs] Fix minor semantic error with no real effect:

Peter Palfrader weasel at seul.org
Mon Mar 13 19:09:54 UTC 2006


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv1420

Modified Files:
	config.c 
Log Message:
Fix minor semantic error with no real effect:
we were doing "is_internal_IP(htonl(in.s_addr))" but in.s_addr is
in network order and is_internal_IP wants host order.  Change to
"is_internal_IP(ntohl(in.s_addr))".


Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.527
retrieving revision 1.528
diff -u -p -d -r1.527 -r1.528
--- config.c	12 Mar 2006 23:31:16 -0000	1.527
+++ config.c	13 Mar 2006 19:09:52 -0000	1.528
@@ -1566,7 +1566,7 @@ resolve_my_address(or_options_t *options
   }
 
   tor_inet_ntoa(&in,tmpbuf,sizeof(tmpbuf));
-  if (is_internal_IP(htonl(in.s_addr), 0) &&
+  if (is_internal_IP(ntohl(in.s_addr), 0) &&
       options->PublishServerDescriptor) {
     /* make sure we're ok with publishing an internal IP */
     if (!options->DirServers) {



More information about the tor-commits mailing list