diff options
author | Florian Westphal <fw@strlen.de> | 2021-04-21 09:51:03 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-04-26 03:20:46 +0200 |
commit | 6c0717545f2ca61c95f5f739da845e77cc8bd498 (patch) | |
tree | 2d91c8bdb12f25d259eb59829d42e5759f01e3a5 /net/ipv6/netfilter/ip6table_filter.c | |
parent | 20a9df33594fe643f9cf46375a9243e3ab8ed3a6 (diff) | |
download | linux-6c0717545f2ca61c95f5f739da845e77cc8bd498.tar.bz2 |
netfilter: ip6tables: unregister the tables by name
Same as the previous patch, but for ip6tables.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter/ip6table_filter.c')
-rw-r--r-- | net/ipv6/netfilter/ip6table_filter.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c index 88337b51ffbf..0c9f75e23ca0 100644 --- a/net/ipv6/netfilter/ip6table_filter.c +++ b/net/ipv6/netfilter/ip6table_filter.c @@ -75,16 +75,13 @@ static int __net_init ip6table_filter_net_init(struct net *net) static void __net_exit ip6table_filter_net_pre_exit(struct net *net) { - if (net->ipv6.ip6table_filter) - ip6t_unregister_table_pre_exit(net, net->ipv6.ip6table_filter, - filter_ops); + ip6t_unregister_table_pre_exit(net, "filter", + filter_ops); } static void __net_exit ip6table_filter_net_exit(struct net *net) { - if (!net->ipv6.ip6table_filter) - return; - ip6t_unregister_table_exit(net, net->ipv6.ip6table_filter); + ip6t_unregister_table_exit(net, "filter"); net->ipv6.ip6table_filter = NULL; } |