diff options
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c index 244eb11b4d..39c7311e6b 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -2066,7 +2066,7 @@ int tor_lookup_hostname(const char *name, uint32_t *addr) * <b>address</b> is provided, set *<b>address</b> to a copy of the * host portion of the string. If <b>addr</b> is provided, try to * resolve the host portion of the string and store it into - * *<b>addr</b> (in network byte order). If <b>port</b> is provided, + * *<b>addr</b> (in host byte order). If <b>port</b> is provided, * store the port number into *<b>port</b>, or 0 if no port is given. * Return 0 on success, -1 on failure. */ @@ -2102,6 +2102,7 @@ parse_addr_port(const char *addrport, char **address, uint32_t *addr, ok = 0; *addr = 0; } + *addr = ntohl(*addr); } if (address && ok) { |