IPV6 fix by east

This commit is contained in:
def 2015-07-12 03:08:58 +02:00
parent da68023f7a
commit 77c1442499

View file

@ -942,7 +942,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);