From: Hengyu Liang <[email protected]>
Since commit 21ec92774d15 ("net: ipv6: fix panic when IPv4 route
references loopback IPv6 nexthop"), adding an IPv6 route via the
loopback device fails in cases that used to work, e.g. when the
loopback device is down, when a gateway is specified or when IPv6 is
disabled on the loopback device, although such routes are promoted to
reject routes afterwards. The commit was also backported to the stable
kernels down to 5.10.
Patch 1 restores the previous behavior for routes. IPv6 nexthop objects
and IPv4 routes with an IPv6 gateway keep the current behavior, so the
panic fixed by the above commit does not come back. Patch 2 adds tests
for these cases to fib_tests.sh.
Hengyu Liang (2):
ipv6: route: do not validate nexthop of routes promoted to reject
routes
selftests: net: fib_tests: add tests for IPv6 routes via loopback
device
net/ipv6/route.c | 29 +++++++++++++++++-----
tools/testing/selftests/net/fib_tests.sh | 31 +++++++++++++++++++++++-
2 files changed, 53 insertions(+), 7 deletions(-)
--
2.53.0