diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-11-15 21:22:24 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-11-15 21:22:24 +0100 |
commit | e6d816f8d096d98deeb0a52f96d44a4ace03ffe7 (patch) | |
tree | 4324095d147e6a3f90778d253fa73b53c618ee3d /src | |
parent | f135f1c317a3c9430dc33a6ea7ff90a1ba808e36 (diff) | |
download | conntrack-tools-e6d816f8d096d98deeb0a52f96d44a4ace03ffe7.tar.gz conntrack-tools-e6d816f8d096d98deeb0a52f96d44a4ace03ffe7.zip |
filter: use jhash2 instead of jhash for IPv6 addresses
Since an IPv6 address can be seen as an array of uint32_t. Use
the optimized jhash2() function instead of the generic jhash().
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/filter.c b/src/filter.c index c4854bb..83c2eb3 100644 --- a/src/filter.c +++ b/src/filter.c @@ -49,7 +49,7 @@ static uint32_t hash(const void *data, struct hashtable *table) static uint32_t hash6(const void *data, struct hashtable *table) { - return jhash(data, sizeof(uint32_t)*4, 0) % table->hashsize; + return jhash2(data, 4, 0) % table->hashsize; } static int compare(const void *data1, const void *data2) |