From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
netfilter-devel@vger.kernel.org
Subject: Re: [PATCH net] netfilter: nf_reject: don't leak dst refcount for loopback packets
Date: Wed, 20 Aug 2025 16:04:47 +0200 [thread overview]
Message-ID: <aKXV_3J4iDkhQ06R@strlen.de> (raw)
In-Reply-To: <aKXLsoLkSdnEU_at@calendula>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > Instead of checking hook just check if the skb already has a route
> > > attached to it.
> >
> > Quick question: does inconditional route lookup work for br_netfilter?
>
> Never mind, it should be fine, the fake dst get attached to the skb.
Good point, this changes behaviour for br_netfilter case, we no
longer call nf_reject_fill_skb_dst() then due to the fake dst.
I don't think br_netfilter is supposed to do anything (iptables
-j REJECT doesn't work in PRE_ROUTING), and we should not encourage
use of br_netfilter with nftables.
What about adding a followup patch, targetting nf, that adds:
if (hook == NF_INET_PRE_ROUTING && nf_bridge_info_exists(oldskb))
return;
?
After all, there is no guarantee that we have the needed routing
info on a bridge in the first place.
next prev parent reply other threads:[~2025-08-20 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 12:37 [PATCH net] netfilter: nf_reject: don't leak dst refcount for loopback packets Florian Westphal
2025-08-20 13:16 ` Pablo Neira Ayuso
2025-08-20 13:20 ` Pablo Neira Ayuso
2025-08-20 14:04 ` Florian Westphal [this message]
2025-08-21 14:47 ` Jakub Kicinski
2025-08-20 13:16 ` Eric Dumazet
2025-08-21 17:20 ` patchwork-bot+netdevbpf
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=aKXV_3J4iDkhQ06R@strlen.de \
--to=fw@strlen.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.