Skip to content

net: ipv4: fix nexthop route delete warning

Nikolay Aleksandrov netdev stable 2 versions – Applied

Status from this message: This series was applied to netdev/net.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesApplied 2/2
  2. v12 patches 7 repliesSuperseded

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: ipv4: fix route with nexthop object delete warningnet/ipv4/fib_semantics.c+6 -13 repliesApplied
2/2selftests: net: add delete nexthop route warning testtools/testing/selftests/net/fib_nexthops.sh+14 -01 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDavid Ahern
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net v2 0/2] net: ipv4: fix nexthop route delete warning

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(-)
Signature · 1 line
2.35.1