From: Ido Schimmel <idosch@idosch.org>
To: Jonas Gorski <jonas.gorski@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
David Ahern <dsahern@kernel.org>
Subject: Re: RTM_DELROUTE not sent anymore when deleting (last) nexthop of routes in 6.1
Date: Thu, 24 Nov 2022 18:04:06 +0200 [thread overview]
Message-ID: <Y3+V9gu4NUQ7P0mL@shredder> (raw)
In-Reply-To: <CAOiHx=mi-M+dWj-Y1ZZJ_xSY_-n0=xy9u1Gmx3Yw=zJHeuiS+A@mail.gmail.com>
On Thu, Nov 24, 2022 at 04:20:49PM +0100, Jonas Gorski wrote:
> We have an integration test using FRR that got broken by this, so I
> can also easily test anything you throw at me (assuming CET working
> hours).
Please test the following fix [1]. Tested manually using [2]. With the
fix or 61b91eb33a69 reverted the route is successfully deleted. Without
the fix I get:
RTNETLINK answers: No such process
198.51.100.0/24 nhid 1 via 192.0.2.2 dev dummy10
If the fix is OK, I will submit it along with a selftest to make
sure it does not regress in the future.
Thanks
[1]
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index f721c308248b..19a662003eef 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -888,9 +888,11 @@ int fib_nh_match(struct net *net, struct fib_config *cfg, struct fib_info *fi,
return 1;
}
- /* cannot match on nexthop object attributes */
- if (fi->nh)
- return 1;
+ if (fi->nh) {
+ if (cfg->fc_oif || cfg->fc_gw_family || cfg->fc_mp)
+ return 1;
+ return 0;
+ }
if (cfg->fc_oif || cfg->fc_gw_family) {
struct fib_nh *nh;
[2]
#!/bin/bash
ip link del dev dummy10 &> /dev/null
ip link add name dummy10 up type dummy
ip address add 192.0.2.1/24 dev dummy10
ip nexthop add id 1 via 192.0.2.2 dev dummy10
ip route add 198.51.100.0/24 nhid 1
ip route del 198.51.100.0/24
ip route show 198.51.100.0/24
next prev parent reply other threads:[~2022-11-24 16:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 9:20 RTM_DELROUTE not sent anymore when deleting (last) nexthop of routes in 6.1 Jonas Gorski
2022-11-24 12:41 ` Ido Schimmel
2022-11-24 14:15 ` Jonas Gorski
2022-11-24 14:40 ` Jonas Gorski
2022-11-24 14:50 ` Ido Schimmel
2022-11-24 15:20 ` Jonas Gorski
2022-11-24 16:04 ` Ido Schimmel [this message]
2022-11-24 16:58 ` Jonas Gorski
2022-11-25 3:53 ` David Ahern
2022-11-25 8:36 ` RTM_DELROUTE not sent anymore when deleting (last) nexthop of routes in 6.1 #forregzbot Thorsten Leemhuis
2022-11-27 12:08 ` Thorsten Leemhuis
2022-11-29 8:50 ` Thorsten Leemhuis
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=Y3+V9gu4NUQ7P0mL@shredder \
--to=idosch@idosch.org \
--cc=dsahern@kernel.org \
--cc=jonas.gorski@gmail.com \
--cc=netdev@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).