Skip to content

Commit

Permalink
[NETFILTER]: nf_nat: remove double bysource hash initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Feb 1, 2008
1 parent ecb6f85 commit d44caf8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/ipv4/netfilter/nf_nat_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,6 @@ static int __init nf_nat_init(void)
rcu_assign_pointer(nf_nat_protos[IPPROTO_ICMP], &nf_nat_protocol_icmp);
write_unlock_bh(&nf_nat_lock);

for (i = 0; i < nf_nat_htable_size; i++) {
INIT_HLIST_HEAD(&bysource[i]);
}

/* Initialize fake conntrack so that NAT will skip it */
nf_conntrack_untracked.status |= IPS_NAT_DONE_MASK;

Expand Down

0 comments on commit d44caf8

Please sign in to comment.