Commit 770ce0ff authored by Harald Welte's avatar Harald Welte Committed by Thomas Graf

[NETFILTER]: ipt_hashlimit: use | instead of & for correct hash key

Signed-off-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7f859721
...@@ -109,7 +109,7 @@ static inline int dst_cmp(const struct dsthash_ent *ent, struct dsthash_dst *b) ...@@ -109,7 +109,7 @@ static inline int dst_cmp(const struct dsthash_ent *ent, struct dsthash_dst *b)
static inline u_int32_t static inline u_int32_t
hash_dst(const struct ipt_hashlimit_htable *ht, const struct dsthash_dst *dst) 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); dst->src_ip, ht->rnd) % ht->cfg.size);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment