On Thu, Mar 05, 2026 at 09:10:00PM +0000, Aleksei Oladko wrote:
> Several forwarding tests (e.g., gre_multipath.sh) initialize both IPv4
> and IPv6 addresses using simple_if_init, but only clean up IPv4
> in simple_if_fini. This leaves stale IPv6 addresses on the interfaces,
> which causes subsequent tests to fail when they encounter unexpected
> address configuration.
> 
> The issue can be reproduced by running tests in sequence:
>   # run_kselftest.sh -t net/forwarding:ipip_hier_gre.sh
>   # run_kselftest.sh -t net/forwarding:min_max_mtu.sh
>   TAP version 13
>   1..1
>   # timeout set to 0
>   # selftests: net/forwarding: min_max_mtu.sh
>   # TEST: ping                                                          [ OK ]
>   # TEST: ping6                                                         [ OK ]
>   # TEST: Test maximum MTU configuration                                [ OK ]
>   # TEST: Test traffic, packet size is maximum MTU                      [FAIL]
>   #       Ping6, packet size: 65487 succeeded, but should have failed
>   # TEST: Test minimum MTU configuration                                [ OK ]
>   # TEST: Test traffic, packet size is minimum MTU                      [ OK ]
>   not ok 1 selftests: net/forwarding: min_max_mtu.sh # exit=1
> 
> Fix this by removing the unused IPv6 argument from simple_if_init in
> tests that don't use IPv6 (gre_multipath.sh, ipip_lib.sh), and by
> adding the missing IPv6 argument to simple_if_fini in tests that
> use IPv6 (gre_multipath_nh.sh, gre_multipath_nh_res.sh).
> 
> Fixes: fed926d4f64c ("selftests: forwarding: Add IP tunneling lib")
> Fixes: 902280cacc03 ("selftests: forwarding: Add resilient multipath 
> tunneling nexthop test")
> Fixes: 54818c4c4b93 ("selftests: forwarding: Test multipath tunneling")
> Fixes: e035146d6560 ("selftests: forwarding: Add multipath tunneling nexthop 
> test")
> Signed-off-by: Aleksei Oladko <[email protected]>

Reviewed-by: Ido Schimmel <[email protected]>

Reply via email to