mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
adds missing ipv6 support for patricia trie index (white/blacklist) under *nix. only worked for nt before..
This commit is contained in:
parent
82f656ec9c
commit
338e15cc38
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue