]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
netfilter: ipt_CLUSTERIP: use clusterip_net to store pernet warning
authorFlorian Westphal <fw@strlen.de>
Thu, 22 Jul 2021 08:48:33 +0000 (10:48 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 1 Aug 2021 10:00:50 +0000 (12:00 +0200)
No need to use struct net for this.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/ipt_CLUSTERIP.c

index 6d7ff14b9084b99436c779696cfb26680ff612cc..8fd1aba8af31cd723bdc5dcdbbd3692e3317842d 100644 (file)
@@ -66,6 +66,7 @@ struct clusterip_net {
        /* lock protects the configs list */
        spinlock_t lock;
 
+       bool clusterip_deprecated_warning;
 #ifdef CONFIG_PROC_FS
        struct proc_dir_entry *procdir;
        /* mutex protects the config->pde*/
@@ -544,10 +545,10 @@ static int clusterip_tg_check(const struct xt_tgchk_param *par)
 
        cn->hook_users++;
 
-       if (!par->net->xt.clusterip_deprecated_warning) {
+       if (!cn->clusterip_deprecated_warning) {
                pr_info("ipt_CLUSTERIP is deprecated and it will removed soon, "
                        "use xt_cluster instead\n");
-               par->net->xt.clusterip_deprecated_warning = true;
+               cn->clusterip_deprecated_warning = true;
        }
 
        cipinfo->config = config;