Merge pull request #1121 from east/ipv6_fix

IPV6 fix
This commit is contained in:
oy 2013-11-25 11:27:33 -08:00
commit 2c73819a15

View file

@ -781,7 +781,9 @@ int net_addr_from_str(NETADDR *addr, const char *string)
return -1;
}
#else
if(inet_pton(AF_INET6, buf, &sa6) != 1)
sa6.sin6_family = AF_INET6;
if(inet_pton(AF_INET6, buf, &sa6.sin6_addr) != 1)
return -1;
#endif
sockaddr_to_netaddr((struct sockaddr *)&sa6, addr);