Skip to content

ipv4: allow route dump replay with nexthop IDs

Yuen Su linux-api linux-kselftest lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ipv4: accept nexthop dump attributes in route deletesnet/ipv4/fib_frontend.c+4 -12 replies
2/2selftests: net: test flushing IPv4 nexthop routes in compat modetools/testing/selftests/net/fib_nexthops.sh+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/2] ipv4: allow route dump replay with nexthop IDs

IPv4 route flush fails when a route dump includes both a nexthop ID and its expanded compatibility attributes. This series fixes the IPv4 kernel delete path so that existing iproute2 can reuse the dump. If a delete supplies RTA_NH_ID, the ID determines the nexthop match.

The first patch limits the mutual exclusion check to operations other than deletion. The second adds a regression case to the existing IPv4 compatibility test. The route type and IPv6 changes discussed in the earlier iproute2 thread are outside this series.

In QEMU/KVM, with the same unmodified iproute2, the new flush and route removal checks failed on the base kernel and passed with the fix. The three selected kselftests passed all 36 checks with the fix.

Codex helped extract the IPv4 kernel fix from the earlier iproute2 investigation, add the test and run the baseline and patched guests.

Earlier iproute2 discussion
https://lists.openwall.net/netdev/2026/10/26/186

Yuen

Yuen Su (2):
ipv4: accept nexthop dump attributes in route deletes
selftests: net: test flushing IPv4 nexthop routes in compat mode

 net/ipv4/fib_frontend.c                     | 5 ++++-
 tools/testing/selftests/net/fib_nexthops.sh | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

base-commit: 2a324a58a084c5cfd7e5a2f55e0786bee170a4a5