mbox series

[net,v2,0/2] net: ipv4: fix nexthop route delete warning

Message ID 20220401073343.277047-1-razor@blackwall.org (mailing list archive)
Headers show
Series net: ipv4: fix nexthop route delete warning | expand

Message

Nikolay Aleksandrov April 1, 2022, 7:33 a.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 1, 2022, 1:10 p.m. UTC | #1
Hello:

This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri,  1 Apr 2022 10:33:41 +0300 you wrote:
> 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
> 
> [...]

Here is the summary with links:
  - [net,v2,1/2] net: ipv4: fix route with nexthop object delete warning
    https://git.kernel.org/netdev/net/c/6bf92d70e690
  - [net,v2,2/2] selftests: net: add delete nexthop route warning test
    https://git.kernel.org/netdev/net/c/392baa339c6a

You are awesome, thank you!