]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: net: add test for IPv4 route with loopback IPv6 nexthop
authorJiayuan Chen <jiayuan.chen@shopee.com>
Wed, 4 Mar 2026 11:38:14 +0000 (19:38 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Mar 2026 15:53:17 +0000 (07:53 -0800)
commit46c1ef0cfcea50aaf0b52316fdab94bf4b45795b
tree55719399e40a72211ad9dc662cadd2ea05a33a20
parent21ec92774d1536f71bdc90b0e3d052eff99cf093
selftests: net: add test for IPv4 route with loopback IPv6 nexthop

Add a regression test for a kernel panic that occurs when an IPv4 route
references an IPv6 nexthop object created on the loopback device.

The test creates an IPv6 nexthop on lo, binds an IPv4 route to it, then
triggers a route lookup via ping to verify the kernel does not crash.

  ./fib_nexthops.sh
  Tests passed: 249
  Tests failed:   0

Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jiayuan Chen <jiayuan.chen@shopee.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20260304113817.294966-3-jiayuan.chen@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/fib_nexthops.sh