adds missing ipv6 support for patricia trie index (white/blacklist) under *nix. only worked for nt before..

This commit is contained in:
Tim Shelton 2019-10-30 16:00:18 +00:00
parent 82f656ec9c
commit 338e15cc38

View file

@ -130,7 +130,14 @@ local_inet_pton (int af, const char *src, void *dst)
return (inet6_addr(src, &Address));
}
#else
else {
else if (af == AF_INET6) { // ipv6 support - redsand @ hawk.io
struct in6_addr i6;
if(inet_pton(AF_INET6, src, &i6) == 0) {
return 0;
}
memcpy(dst, &i6.s6_addr, sizeof(i6.s6_addr));
return 1;
} else {
errno = EAFNOSUPPORT;
return -1;
}