From: Ido Schimmel <idosch@nvidia.com>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: David Ahern <dsahern@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH v1 net] ipv4: fib: Don't ignore error route in local/main tables.
Date: Mon, 22 Jun 2026 10:05:49 +0300 [thread overview]
Message-ID: <20260622070549.GA89414@shredder> (raw)
In-Reply-To: <20260619212753.3367244-1-kuniyu@google.com>
On Fri, Jun 19, 2026 at 09:27:20PM +0000, Kuniyuki Iwashima wrote:
> When CONFIG_IP_MULTIPLE_TABLES is enabled but no rule is added,
> fib_lookup() performs route lookup directly on two tables.
>
> Since the first lookup does not properly bail out, the result
> of an error route in the merged local/main table could be
> overwritten by another route in the default table:
>
> # unshare -n
> # ip link set lo up
> # ip route add 192.168.0.0/24 dev lo table 253
> # ip route add unreachable 192.168.0.0/24
> # ip route get 192.168.0.1
> 192.168.0.1 dev lo table default uid 0
> cache <local>
>
> Once a random rule is added, the error route is respected:
>
> # ip rule add table 0
> # ip rule del table 0
> # ip route get 192.168.0.1
> RTNETLINK answers: No route to host
>
> Let's fix the inconsistent behaviour.
>
> Fixes: f4530fa574df ("ipv4: Avoid overhead when no custom FIB rules are installed.")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
prev parent reply other threads:[~2026-06-22 7:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 21:27 [PATCH v1 net] ipv4: fib: Don't ignore error route in local/main tables Kuniyuki Iwashima
2026-06-22 7:05 ` 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=20260622070549.GA89414@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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.