diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-05-21 13:21:49 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-05-21 13:21:49 +0200 |
commit | 599e63ea72995ff36d445cd5bd9849ecdd4590ae (patch) | |
tree | 8797bb2abc663c826885b3a93352a090a612ebb2 /src/cache.c | |
parent | 768a0835e47472a99af14707ec84ea9184b6577d (diff) | |
download | conntrack-tools-599e63ea72995ff36d445cd5bd9849ecdd4590ae.tar.gz conntrack-tools-599e63ea72995ff36d445cd5bd9849ecdd4590ae.zip |
check for missing IPv6 address before hashing
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cache.c b/src/cache.c index 4162661..ed76680 100644 --- a/src/cache.c +++ b/src/cache.c @@ -75,6 +75,14 @@ static uint32_t hash(const void *data, struct hashtable *table) ret = __hash4(u->ct, table); break; case AF_INET6: + if (!nfct_attr_is_set(u->ct, ATTR_ORIG_IPV6_SRC) || + !nfct_attr_is_set(u->ct, ATTR_ORIG_IPV6_DST)) { + dlog(LOG_ERR, "missing IPv6 address. " + "You forgot to load " + "nf_conntrack_ipv6?"); + return 0; + } + ret = __hash6(u->ct, table); break; default: |