Skip to content

Commit

Permalink
netfilter: ipt_CLUSTERIP: use clusterip_net to store pernet warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Westphal authored and Pablo Neira Ayuso committed Aug 1, 2021
1 parent 7c1829b commit ded2d10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/ipv4/netfilter/ipt_CLUSTERIP.c
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ded2d10

Please sign in to comment.