From e6d816f8d096d98deeb0a52f96d44a4ace03ffe7 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 15 Nov 2008 21:22:24 +0100 Subject: 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 --- src/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/filter.c') 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) -- cgit v1.2.3