Netdev List
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: netdev-bot+sashiko@kernel.org
Cc: leonard@lausen.nl, netdev@vger.kernel.org, dsahern@kernel.org,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, pablo@netfilter.org,
	fw@strlen.de, phil@nwl.cc, shuah@kernel.org,
	daniel@iogearbox.net, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 1/2] ipv6: honor prefix-length suppression in raw FIB lookups
Date: Mon, 16 Nov 2026 14:50:56 +0200	[thread overview]
Message-ID: <20261116125056.GA275796@shredder> (raw)
In-Reply-To: <179482978100.3136.17418106822071501090@kernel.org>

On Mon, Nov 16, 2026 at 11:49:41AM +0000, netdev-bot+sashiko@kernel.org wrote:
> > diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
> > index 0ffd7b47a0460..ceb4180bcf2f8 100644
> > --- a/net/ipv6/fib6_rules.c
> > +++ b/net/ipv6/fib6_rules.c
> > @@ -283,9 +283,16 @@ INDIRECT_CALLABLE_SCOPE bool fib6_rule_suppress(struct fib_rule *rule,
> >  						struct fib_lookup_arg *arg)
> >  {
> >  	struct fib6_result *res = arg->result;
> > -	struct rt6_info *rt = res->rt6;
> > +	struct rt6_info *rt;
> >  	struct net_device *dev = NULL;
> >
> > +	if (arg->lookup_ptr == fib6_table_lookup) {
> > +		/* Raw lookups report reject routes without an error. */
> > +		return !(res->fib6_flags & RTF_REJECT) &&
> > +		       res->f6i->fib6_dst.plen <= rule->suppress_prefixlen;
> > +	}
> 
> [Severity: Medium]
> 
> Can the raw and dst paths now disagree for a destination that has a
> cached exception route?

Yes, and I already mentioned this here:

https://lore.kernel.org/netdev/20261115154639.GA4121811@shredder/

[...]

> Should the dst branch use the parent FIB entry's prefix length for
> RTF_CACHE routes (via rt->from), so that both paths agree? That would also
> be closer to what fib4_rule_suppress() does for IPv4. If not, could the
> commit message document this divergence?

The dst branch should be fixed to derive the prefix length from the FIB
entry and I will take care of it, but it shouldn't be done in this
patch. The patch is doing the right thing and using the FIB entry in
the "raw path".

Not sure we need to overload the commit message with this info. Maybe
under the '---'.

  reply	other threads:[~2026-11-16 12:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 11:44 [PATCH net v2 0/2] ipv6: honor prefix-length suppression in raw FIB lookups Leonard Lausen
2026-11-15 11:44 ` [PATCH net v2 1/2] " Leonard Lausen
2026-11-15 15:46   ` Ido Schimmel
2026-11-16 11:49   ` netdev-bot+sashiko
2026-11-16 12:50     ` Ido Schimmel [this message]
2026-11-15 11:44 ` [PATCH net v2 2/2] selftests: netfilter: cover IPv6 FIB prefix suppression Leonard Lausen
2026-11-16 11:49   ` netdev-bot+sashiko

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=20261116125056.GA275796@shredder \
    --to=idosch@nvidia.com \
    --cc=coreteam@netfilter.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=fw@strlen.de \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leonard@lausen.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=shuah@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