[netfilter-cvslog] [conntrack-tools] check for missing IPv6 address before hashing

Pablo Neira netfilter-cvslog-bounces at lists.netfilter.org
Wed May 21 13:34:44 CEST 2008


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=599e63ea72995ff36d445cd5bd9849ecdd4590ae
commit 599e63ea72995ff36d445cd5bd9849ecdd4590ae
Author:     Pablo Neira Ayuso <pablo at netfilter.org>
AuthorDate: Wed May 21 13:21:49 2008 +0200
Commit:     Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Wed May 21 13:21:49 2008 +0200

    check for missing IPv6 address before hashing
       via  599e63ea72995ff36d445cd5bd9849ecdd4590ae (commit)
      from  768a0835e47472a99af14707ec84ea9184b6577d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 599e63ea72995ff36d445cd5bd9849ecdd4590ae
Author: Pablo Neira Ayuso <pablo at netfilter.org>
Date:   Wed May 21 13:21:49 2008 +0200

    check for missing IPv6 address before hashing

-----------------------------------------------------------------------

 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:



More information about the netfilter-cvslog mailing list