aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/netfilter/ip6table_nat.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-04-21 09:51:05 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-04-26 03:20:46 +0200
commitf68772ed678376f52dbb2e20c9f982e6d8b3407b (patch)
tree8e57f9a9758fed479d63ae383a6a498704c10850 /net/ipv6/netfilter/ip6table_nat.c
parentnetfilter: arptables: unregister the tables by name (diff)
downloadlinux-dev-f68772ed678376f52dbb2e20c9f982e6d8b3407b.tar.xz
linux-dev-f68772ed678376f52dbb2e20c9f982e6d8b3407b.zip
netfilter: x_tables: remove paranoia tests
No need for these. There is only one caller, the xtables core, when the table is registered for the first time with a particular network namespace. After ->table_init() call, the table is linked into the tables[af] list, so next call to that function will skip the ->table_init(). Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter/ip6table_nat.c')
-rw-r--r--net/ipv6/netfilter/ip6table_nat.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6table_nat.c b/net/ipv6/netfilter/ip6table_nat.c
index 7eb61e6b1e52..c7f98755191b 100644
--- a/net/ipv6/netfilter/ip6table_nat.c
+++ b/net/ipv6/netfilter/ip6table_nat.c
@@ -92,9 +92,6 @@ static int __net_init ip6table_nat_table_init(struct net *net)
struct ip6t_replace *repl;
int ret;
- if (net->ipv6.ip6table_nat)
- return 0;
-
repl = ip6t_alloc_initial_table(&nf_nat_ipv6_table);
if (repl == NULL)
return -ENOMEM;