From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: nftables: fix nf_trace always-on with XT_TRACE=n
Date: Sun, 16 Feb 2014 11:20:03 +0100 [thread overview]
Message-ID: <20140216102003.GA4981@localhost> (raw)
In-Reply-To: <1392504525-21134-1-git-send-email-fw@strlen.de>
Hi Florian,
On Sat, Feb 15, 2014 at 11:48:45PM +0100, Florian Westphal wrote:
> When using nftables with CONFIG_NETFILTER_XT_TARGET_TRACE=n, we get
> lots of "TRACE: filter:output:policy:1 IN=..." warnings as several
> places will leave skb->nf_trace uninitialised.
Good catch.
> Unlike iptables tracing functionality is not conditional in nftables,
> so always copy/zero nf_trace setting when nftables is enabled.
>
> Move this into __nf_copy() helper.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
> include/linux/skbuff.h | 5 ++++-
> net/core/skbuff.c | 3 ---
> net/ipv4/ip_output.c | 3 ---
> net/ipv6/ip6_output.c | 3 ---
> 4 files changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 1f689e6..99fc8b3 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -2724,7 +2724,7 @@ static inline void nf_reset(struct sk_buff *skb)
>
> static inline void nf_reset_trace(struct sk_buff *skb)
> {
> -#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)
> +#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES)
Perhaps you can add a generic CONFIG_NF_TRACE that is set by xt_trace
and nf_tables?
next prev parent reply other threads:[~2014-02-16 10:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 22:48 [PATCH] netfilter: nftables: fix nf_trace always-on with XT_TRACE=n Florian Westphal
2014-02-16 10:20 ` Pablo Neira Ayuso [this message]
2014-02-16 10:28 ` Florian Westphal
2014-02-16 10:43 ` Pablo Neira Ayuso
2014-02-16 10:45 ` Patrick McHardy
2014-02-16 11:06 ` Florian Westphal
2014-02-17 10:40 ` 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=20140216102003.GA4981@localhost \
--to=pablo@netfilter.org \
--cc=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).