On 4/13/26 5:45 AM, Jiayuan Chen wrote:
> Add test cases that exercise the scenario where an IPv6 nexthop is
> replaced with an IPv4 nexthop while being part of a group. The group's
> has_v4 flag must be updated so that subsequent IPv6 route additions are
> properly rejected.
> 
> Two cases are covered:
>   1. Gateway nexthop replaced across families with an existing IPv6
>      route on the group (rejected by fib6_check_nh_list).
>   2. Blackhole nexthop replaced across families with no existing IPv6
>      route on the group (fib6_check_nh_list returns early) — this is
>      the path that triggers a NULL ptr deref without the kernel fix.
> 
> Signed-off-by: Jiayuan Chen <[email protected]>
> ---
>  tools/testing/selftests/net/fib_nexthops.sh | 22 +++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 

Reviewed-by: David Ahern <[email protected]>


Reply via email to