Netdev List
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Yifei Sun <yifei.sun@inria.fr>
Cc: netdev@vger.kernel.org, dsahern@kernel.org, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	willemb@google.com, horms@kernel.org, razor@blackwall.org,
	shuah@kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net v2 1/2] ipv4: keep scanning the leaf when a nexthop object is unusable
Date: Thu, 26 Nov 2026 21:24:07 +0200	[thread overview]
Message-ID: <20261126192407.GA1010466@shredder> (raw)
In-Reply-To: <20261126162538.2509994-1-yifei.sun@inria.fr>

On Thu, Nov 26, 2026 at 05:25:37PM +0100, Yifei Sun wrote:
> With veth1 on 172.16.1.0/24 and veth3 on 172.16.2.0/24:
> 
>   # ip nexthop add id 12 via 172.16.1.2 dev veth1
>   # ip route add 10.0.0.0/24 nhid 12
>   # ip route add 10.0.0.0/16 via 172.16.2.2 dev veth3
>   # ip route get fibmatch 10.0.0.1 oif veth3
>   RTNETLINK answers: No route to host
> 
> When the /24's nexthop object has no path on veth3, fib_table_lookup()
> backtracks past the /16 in the same leaf. A socket bound to veth3 then
> ARPs for the destination instead of the gateway. Fix this by trying the
> next alias in the same leaf. The lookup already does this when no
> inline nexthop is usable.
> 
> Fixes: af7888ad9edb ("ipv4: Refactor nhc evaluation in fib_table_lookup")
> Signed-off-by: Yifei Sun <yifei.sun@inria.fr>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

      parent reply	other threads:[~2026-11-26 19:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 16:25 [PATCH net v2 1/2] ipv4: keep scanning the leaf when a nexthop object is unusable Yifei Sun
2026-11-26 16:25 ` [PATCH net v2 2/2] selftests: net: test IPv4 nexthop fallback in the same trie leaf Yifei Sun
2026-11-26 19:28   ` Ido Schimmel
2026-11-26 19:24 ` Ido Schimmel [this message]

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=20261126192407.GA1010466@shredder \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    --cc=willemb@google.com \
    --cc=yifei.sun@inria.fr \
    /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