Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[NETFILTER]: nf_nat: remove double bysource hash initialization

The hash table is already initialized by nf_ct_alloc_hashtable().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Patrick McHardy and committed by
David S. Miller
d44caf88 ecb6f85e

-4
-4
net/ipv4/netfilter/nf_nat_core.c
··· 654 654 rcu_assign_pointer(nf_nat_protos[IPPROTO_ICMP], &nf_nat_protocol_icmp); 655 655 write_unlock_bh(&nf_nat_lock); 656 656 657 - for (i = 0; i < nf_nat_htable_size; i++) { 658 - INIT_HLIST_HEAD(&bysource[i]); 659 - } 660 - 661 657 /* Initialize fake conntrack so that NAT will skip it */ 662 658 nf_conntrack_untracked.status |= IPS_NAT_DONE_MASK; 663 659