netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Gorski <jonas.gorski@gmail.com>
To: Network Development <netdev@vger.kernel.org>
Cc: David Ahern <dsahern@kernel.org>
Subject: RTM_DELROUTE not sent anymore when deleting (last) nexthop of routes in 6.1
Date: Thu, 24 Nov 2022 10:20:00 +0100	[thread overview]
Message-ID: <CAOiHx==ddZr6mvvbzgoAwwhJW76qGNVOcNsTG-6m79Ch+=aA5Q@mail.gmail.com> (raw)

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.

It can be reproduced by doing the following and listening to netlink
(e.g. via ip monitor)

ip a a 172.16.1.1/24 dev veth1
ip nexthop add id 100 via 172.16.1.2 dev veth1
ip route add 172.16.101.0/24 nhid 100
ip nexthop del id 100

where the nexthop del will trigger a RTM_DELNEXTHOP message, but no
RTM_DELROUTE, but the route is gone afterwards anyways.

Doing the same thing with IPv6 still works as expected

ip a a 2001:db8:91::1/64 dev veth1
ip nexthop add id 100 via 2001:db8:91::2 dev veth1
ip route add 2001:db8:101::/64 nhid 100
ip nexthop del id 100

Here the kernel will send out both the RTM_DELNEXTHOP and the
RTM_DELROUTE netlink messages.

Unfortunately my net-foo is not good enough to propose a fix.

Best regards
Jonas

             reply	other threads:[~2022-11-24  9:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  9:20 Jonas Gorski [this message]
2022-11-24 12:41 ` RTM_DELROUTE not sent anymore when deleting (last) nexthop of routes in 6.1 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
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='CAOiHx==ddZr6mvvbzgoAwwhJW76qGNVOcNsTG-6m79Ch+=aA5Q@mail.gmail.com' \
    --to=jonas.gorski@gmail.com \
    --cc=dsahern@kernel.org \
    --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).