SF #784031: Byte-order bug in socket-module getaddrinfo.c

This commit is contained in:
Raymond Hettinger 2003-08-17 21:28:39 +00:00
parent 6a1801271a
commit 3432118022
1 changed files with 1 additions and 0 deletions

View File

@ -421,6 +421,7 @@ getaddrinfo(const char*hostname, const char*servname,
switch (gai_afdl[i].a_af) {
case AF_INET:
v4a = ((struct in_addr *)pton)->s_addr;
v4a = ntohl(v4a);
if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
pai->ai_flags &= ~AI_CANONNAME;
v4a >>= IN_CLASSA_NSHIFT;