netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] net: ipv4: fix nexthop route delete warning
@ 2022-04-01  7:33 Nikolay Aleksandrov
  2022-04-01  7:33 ` [PATCH net v2 1/2] net: ipv4: fix route with nexthop object " Nikolay Aleksandrov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nikolay Aleksandrov @ 2022-04-01  7:33 UTC (permalink / raw)
  To: netdev
  Cc: dsahern, donaldsharp72, philippe.guibert, kuba, davem, idosch,
	Nikolay Aleksandrov

Hi,
The first patch fixes a warning that can be triggered by deleting a
nexthop route and specifying a device (more info in its commit msg).
And the second patch adds a selftest for that case.

Chose this way to fix it because we should match when deleting without
nh spec and should fail when deleting a nexthop route with old-style nh
spec because nexthop objects are managed separately, e.g.:
$ ip r show 1.2.3.4/32
1.2.3.4 nhid 12 via 192.168.11.2 dev dummy0 

$ ip r del 1.2.3.4/32
$ ip r del 1.2.3.4/32 nhid 12
<both should work>

$ ip r del 1.2.3.4/32 dev dummy0
<should fail with ESRCH>

v2: addded more to patch 01's commit message
    adjusted the test comment in patch 02

Thanks,
 Nik

Nikolay Aleksandrov (2):
  net: ipv4: fix route with nexthop object delete warning
  selftests: net: add delete nexthop route warning test

 net/ipv4/fib_semantics.c                    |  7 ++++++-
 tools/testing/selftests/net/fib_nexthops.sh | 14 ++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-08 15:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-01  7:33 [PATCH net v2 0/2] net: ipv4: fix nexthop route delete warning Nikolay Aleksandrov
2022-04-01  7:33 ` [PATCH net v2 1/2] net: ipv4: fix route with nexthop object " Nikolay Aleksandrov
2022-04-08 14:31   ` Nicolas Dichtel
2022-04-08 15:06     ` Jack Wang
2022-04-08 15:12       ` Nicolas Dichtel
2022-04-01  7:33 ` [PATCH net v2 2/2] selftests: net: add delete nexthop route warning test Nikolay Aleksandrov
2022-04-01 15:54   ` [PATCH net] selftests: net: fix nexthop warning cleanup double ip typo Nikolay Aleksandrov
2022-04-03 12:10     ` patchwork-bot+netdevbpf
2022-04-01 13:10 ` [PATCH net v2 0/2] net: ipv4: fix nexthop route delete warning patchwork-bot+netdevbpf

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).