From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nf-next 2/3] netfilter: ipt_CLUSTERIP: use clusterip_net to store pernet warning
Date: Thu, 22 Jul 2021 10:48:33 +0200 [thread overview]
Message-ID: <20210722084834.27027-3-fw@strlen.de> (raw)
In-Reply-To: <20210722084834.27027-1-fw@strlen.de>
No need to use struct net for this.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
net/ipv4/netfilter/ipt_CLUSTERIP.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 11bcf599358d..e6f65885d12b 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -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;
--
2.31.1
next prev parent reply other threads:[~2021-07-22 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 8:48 [PATCH nf-next 0/3] netfilter: clusterip: don't register hook in all netns Florian Westphal
2021-07-22 8:48 ` [PATCH nf-next 1/3] netfilter: ipt_CLUSTERIP: only add arp mangle hook when required Florian Westphal
2021-07-22 8:48 ` Florian Westphal [this message]
2021-07-22 8:48 ` [PATCH nf-next 3/3] netfilter: remove xt pernet data Florian Westphal
2021-08-01 9:46 ` [PATCH nf-next 0/3] netfilter: clusterip: don't register hook in all netns Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210722084834.27027-3-fw@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).