]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/ipv4/netfilter/ipt_CLUSTERIP.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
[mirror_ubuntu-bionic-kernel.git] / net / ipv4 / netfilter / ipt_CLUSTERIP.c
index efaa04dcc80e3a66ef34fa6bd13be66b601925b0..69060e3abe8598b350e6bfe5815a702c4b3d2ade 100644 (file)
@@ -625,7 +625,7 @@ arp_mangle(void *priv,
        return NF_ACCEPT;
 }
 
-static struct nf_hook_ops cip_arp_ops __read_mostly = {
+static const struct nf_hook_ops cip_arp_ops = {
        .hook = arp_mangle,
        .pf = NFPROTO_ARP,
        .hooknum = NF_ARP_OUT,
@@ -813,12 +813,13 @@ static int clusterip_net_init(struct net *net)
 
 static void clusterip_net_exit(struct net *net)
 {
-#ifdef CONFIG_PROC_FS
        struct clusterip_net *cn = net_generic(net, clusterip_net_id);
+#ifdef CONFIG_PROC_FS
        proc_remove(cn->procdir);
        cn->procdir = NULL;
 #endif
        nf_unregister_net_hook(net, &cip_arp_ops);
+       WARN_ON_ONCE(!list_empty(&cn->configs));
 }
 
 static struct pernet_operations clusterip_net_ops = {