diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-03-14 06:03:17 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-03-15 12:38:40 +0100 |
commit | 1cdb09056b27b2a06b06dc7187d2c33d57082d20 (patch) | |
tree | 3f35fb8ebbafd2936be7b323b43982363af8ac8f /net | |
parent | fa900b9cf5a574cc66cc9b50749999d8b6de6ed8 (diff) | |
download | blackbird-op-linux-1cdb09056b27b2a06b06dc7187d2c33d57082d20.tar.gz blackbird-op-linux-1cdb09056b27b2a06b06dc7187d2c33d57082d20.zip |
netfilter: nfnetlink_queue: use xor hash function to distribute instances
Thanks to Eric Dumazet for suggesting this during the NFWS.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nfnetlink_queue_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c index 858fd52c1040..350c50fbfd4d 100644 --- a/net/netfilter/nfnetlink_queue_core.c +++ b/net/netfilter/nfnetlink_queue_core.c @@ -73,7 +73,7 @@ static struct hlist_head instance_table[INSTANCE_BUCKETS] __read_mostly; static inline u_int8_t instance_hashfn(u_int16_t queue_num) { - return ((queue_num >> 8) | queue_num) % INSTANCE_BUCKETS; + return ((queue_num >> 8) ^ queue_num) % INSTANCE_BUCKETS; } static struct nfqnl_instance * |