Commit f908bb8e by Ian Douglas Scott Committed by Patrick Steinhardt

Convert port with htons() in p_getaddrinfo()

`sin_port` should be in network byte order.
parent e7c24ea2
......@@ -40,7 +40,7 @@ int p_getaddrinfo(
if (ainfo->ai_servent)
ainfo->ai_port = ainfo->ai_servent->s_port;
else
ainfo->ai_port = atol(port);
ainfo->ai_port = htons(atol(port));
memcpy(&ainfo->ai_addr_in.sin_addr,
ainfo->ai_hostent->h_addr_list[0],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment