Skip to contentSkip to conversation

ipt_hashlimit: use | instead of & for correct hash key

PATCH Applied Harald Welte 2 participants 2 messages Mar 13, 2005 – Mar 15, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipt_hashlimit: use | instead of & for correct hash key

Hi Dave!

Please apply the followign trivial fix, Thanks

net/ipv4/netfilter/ipt_hashlimit.c +1 -1
@@ -112,7 +112,7 @@
 static inline u_int32_t
 hash_dst(const struct ipt_hashlimit_htable *ht, const struct dsthash_dst *dst)
 {
-	return (jhash_3words(dst->dst_ip, (dst->dst_port<<16 & dst->src_port), 
+	return (jhash_3words(dst->dst_ip, (dst->dst_port<<16 | dst->src_port), 
 			     dst->src_ip, ht->rnd) % ht->cfg.size);
 }
 
Signature · 4 lines
- Harald Welte <[email protected]>          	        http://gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)