]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
netfilter: arp_tables: register table in initns
authorFlorian Westphal <fw@strlen.de>
Tue, 29 Mar 2016 09:05:16 +0000 (11:05 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 7 Apr 2016 09:58:49 +0000 (11:58 +0200)
arptables is broken since we didn't register the table anymore --
even 'arptables -L' fails.

Fixes: b9e69e127397187b ("netfilter: xtables: don't hook tables by default")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/arptable_filter.c

index dd8c80dc32a2216d3705b75cc761bdb156806dc9..8f8713b4388fbfa9a0d36298603995b02718d21d 100644 (file)
@@ -81,6 +81,12 @@ static int __init arptable_filter_init(void)
                return ret;
        }
 
+       ret = arptable_filter_table_init(&init_net);
+       if (ret) {
+               unregister_pernet_subsys(&arptable_filter_net_ops);
+               kfree(arpfilter_ops);
+       }
+
        return ret;
 }