[or-cvs] routerinfo->addr is host order
Roger Dingledine
arma at seul.org
Wed Apr 7 06:17:29 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
router.c
Log Message:
routerinfo->addr is host order
Index: router.c
===================================================================
RCS file: /home/or/cvsroot/src/or/router.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- router.c 6 Apr 2004 22:23:12 -0000 1.22
+++ router.c 7 Apr 2004 06:17:27 -0000 1.23
@@ -352,7 +352,7 @@
ri = tor_malloc_zero(sizeof(routerinfo_t));
ri->address = tor_strdup(options.Address);
ri->nickname = tor_strdup(options.Nickname);
- ri->addr = (uint32_t) addr.s_addr;
+ ri->addr = (uint32_t) ntohl(addr.s_addr);
ri->or_port = options.ORPort;
ri->socks_port = options.SocksPort;
ri->dir_port = options.DirPort;
More information about the tor-commits
mailing list