netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>
Cc: netfilter-devel@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: Re: [nf-next PATCH] netfilter: conntrack: Add and use nf_ct_set_auto_assign_helper_warned()
Date: Sat, 19 Mar 2022 23:29:52 +0100	[thread overview]
Message-ID: <YjZZYCNd0juT1gAc@salvia> (raw)
In-Reply-To: <20220302210255.10177-1-phil@nwl.cc>

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

Hi Phil,

On Wed, Mar 02, 2022 at 10:02:55PM +0100, Phil Sutter wrote:
> The function sets the pernet boolean to avoid the spurious warning from
> nf_ct_lookup_helper() when assigning conntrack helpers via nftables.

I'm going to apply this alternative patch, based on yours. No need to
expose a symbol to access the pernet area. I have also added the Fixes: tag.

Thanks.

[-- Attachment #2: 0001-netfilter-nft_ct-spurious-warning-when-assigning-con.patch --]
[-- Type: text/x-diff, Size: 1061 bytes --]

From 292d6870c88cf855f1ccc72975974a50edd80720 Mon Sep 17 00:00:00 2001
From: Phil Sutter <phil@nwl.cc>
Date: Wed, 2 Mar 2022 22:02:55 +0100
Subject: [PATCH] netfilter: nft_ct: spurious warning when assigning conntrack
 helpers

The function sets the pernet boolean to avoid the spurious warning from
nf_ct_lookup_helper() when assigning conntrack helpers via nftables.

Fixes: 1a64edf54f55 ("netfilter: nft_ct: add helper set support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nft_ct.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index 5adf8bb628a8..2a6dcbd06590 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -1041,6 +1041,9 @@ static int nft_ct_helper_obj_init(const struct nft_ctx *ctx,
 	if (err < 0)
 		goto err_put_helper;
 
+	/* Avoid the bogus warning, helper will be assigned after CT init */
+	nf_ct_pernet(ctx->net)->auto_assign_helper_warned = true;
+
 	return 0;
 
 err_put_helper:
-- 
2.30.2


  reply	other threads:[~2022-03-19 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 21:02 [nf-next PATCH] netfilter: conntrack: Add and use nf_ct_set_auto_assign_helper_warned() Phil Sutter
2022-03-19 22:29 ` Pablo Neira Ayuso [this message]
2022-03-19 23:27   ` 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=YjZZYCNd0juT1gAc@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@nwl.cc \
    /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).