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 16:50:37 +0200 [thread overview]
Message-ID: <Y3+Evdg9ODFVM9/w@shredder> (raw)
In-Reply-To: <CAOiHx=n2O1m24ZbMRbfD1=PCs-yYajpjNWR1y1oBP8Rz-8wA5A@mail.gmail.com>
On Thu, Nov 24, 2022 at 03:40:19PM +0100, Jonas Gorski wrote:
> On Thu, 24 Nov 2022 at 15:15, Jonas Gorski <jonas.gorski@gmail.com> wrote:
> >
> > Hi Ido,
> >
> > On Thu, 24 Nov 2022 at 13:41, Ido Schimmel <idosch@idosch.org> wrote:
> > >
> > > On Thu, Nov 24, 2022 at 10:20:00AM +0100, Jonas Gorski wrote:
> > > > Hello,
> > > >
> > > > when an IPv4 route gets removed because its nexthop was deleted, the
> > > > kernel does not send a RTM_DELROUTE netlink notifications anymore in
> > > > 6.1. A bisect lead me to 61b91eb33a69 ("ipv4: Handle attempt to delete
> > > > multipath route when fib_info contains an nh reference"), and
> > > > reverting it makes it work again.
> > > >
> > >
> > > Are you running an upstream kernel?
> >
> > Okay, after having a second look, you are right, and I got myself
> > confused by IPv6 generating RTM_DELROUTE notifications, but which is
> > besides the point.
> >
> > The point where it fails is that FRR tries to delete its route(s), and
> > fails to do so with this commit applied (=> RTM_DELROUTE goes
> > missing), then does the RTM_DELNEXTHOP.
> >
> > So while there is indeed no RTM_DELROUTE generated in response to the
> > kernel, it was generated when FRR was successfully deleting its routes
> > before.
> >
> > Not sure if this already qualifies as breaking userspace though, but
> > it's definitely something that used to work with 6.0 and before, and
> > does not work anymore now.
> >
> > The error in FRR log is:
> >
> > [YXPF5-B2CE0] netlink_route_multipath_msg_encode: RTM_DELROUTE
> > 10.0.1.0/24 vrf 0(254)
> > [HYEHE-CQZ9G] nl_batch_send: netlink-dp (NS 0), batch size=44, msg cnt=1
> > [XS99C-X3KS5] netlink-dp (NS 0): error: No such process
> > type=RTM_DELROUTE(25), seq=22, pid=2419702167
> >
> > with the revert it succeeds.
> >
> > I'll see if I can get a better idea of the actual netlink message sent.
>
> Okay, found the knob:
>
> nlmsghdr [len=44 type=(25) DELROUTE flags=(0x0401)
> {REQUEST,(ATOMIC|CREATE)} seq=22 pid=2185212923]
> rtmsg [family=(2) AF_INET dstlen=24 srclen=0 tos=0 table=254
> protocol=(186) UNKNOWN scope=(0) UNIVERSE type=(0) UNSPEC flags=0x0000
> {}]
> rta [len=8 (payload=4) type=(1) DST]
> 10.0.1.0
> rta [len=8 (payload=4) type=(6) PRIORITY]
> 20
The route is deleted with only prefix information (NH_ID not specified).
Matches this comment and the code:
https://github.com/FRRouting/frr/blob/master/zebra/rt_netlink.c#L2091
> netlink-dp (NS 0): error: No such process type=RTM_DELROUTE(25),
> seq=22, pid=2185212923
>
> The route was created via
>
> nlmsghdr [len=52 type=(24) NEWROUTE flags=(0x0501)
> {REQUEST,DUMP,(ROOT|REPLACE|CAPPED),(ATOMIC|CREATE)} seq=18
> pid=2185212923]
> rtmsg [family=(2) AF_INET dstlen=24 srclen=0 tos=0 table=254
> protocol=(186) UNKNOWN scope=(0) UNIVERSE type=(1) UNICAST
> flags=0x0000 {}]
> rta [len=8 (payload=4) type=(1) DST]
> 10.0.1.0
> rta [len=8 (payload=4) type=(6) PRIORITY]
> 20
> rta [len=8 (payload=4) type=(30) NH_ID]
> 18
Here the nexthop ID is obviously present.
Let me try to fix it and add a test for this flow.
Thanks for all the details!
>
> and for completion the nexthop is created via:
>
> nlmsghdr [len=48 type=(104) NEWNEXTHOP flags=(0x0501)
> {REQUEST,DUMP,(ROOT|REPLACE|CAPPED),(ATOMIC|CREATE)} seq=17
> pid=2185212923]
> nhm [family=(2) AF_INET scope=(0) UNIVERSE protocol=(11) ZEBRA
> flags=0x00000000 {}]
> rta [len=8 (payload=4) type=(1) ID]
> 18
> rta [len=8 (payload=4) type=(6) GATEWAY]
> 10.0.0.1
> rta [len=8 (payload=4) type=(5) OIF]
> 62
>
>
> Regards
> Jonas
next prev parent reply other threads:[~2022-11-24 14:51 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 [this message]
2022-11-24 15:20 ` Jonas Gorski
2022-11-24 16:04 ` Ido Schimmel
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+Evdg9ODFVM9/w@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