Skip to content

Commit d44caf8

Browse files
kaberdavem330
authored andcommitted
[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>
1 parent ecb6f85 commit d44caf8

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎net/ipv4/netfilter/nf_nat_core.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,6 @@ static int __init nf_nat_init(void)
654654
rcu_assign_pointer(nf_nat_protos[IPPROTO_ICMP], &nf_nat_protocol_icmp);
655655
write_unlock_bh(&nf_nat_lock);
656656

657-
for (i = 0; i < nf_nat_htable_size; i++) {
658-
INIT_HLIST_HEAD(&bysource[i]);
659-
}
660-
661657
/* Initialize fake conntrack so that NAT will skip it */
662658
nf_conntrack_untracked.status |= IPS_NAT_DONE_MASK;
663659

0 commit comments

Comments
 (0)