Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: net: add ipv6 RA route to ECMP merge test

As commit bbf4a17ad9ff ("ipv6: Fix ECMP sibling count mismatch when
clearing RTF_ADDRCONF") pointed out, RA routes are not elegible for ECMP
merging.

Add a test scenario mixing RA and static routes with gateway to check
that they are not getting merged.

Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Link: https://patch.msgid.link/20260313124827.3945-1-fmancera@suse.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Fernando Fernandez Mancera and committed by
Paolo Abeni
fdd97314 febe8012

+19
+2
tools/testing/selftests/net/config
··· 43 43 CONFIG_IPV6_IOAM6_LWTUNNEL=y 44 44 CONFIG_IPV6_MROUTE=y 45 45 CONFIG_IPV6_MULTIPLE_TABLES=y 46 + CONFIG_IPV6_ROUTE_INFO=y 47 + CONFIG_IPV6_ROUTER_PREF=y 46 48 CONFIG_IPV6_RPL_LWTUNNEL=y 47 49 CONFIG_IPV6_SEG6_LWTUNNEL=y 48 50 CONFIG_IPV6_SIT=y
+17
tools/testing/selftests/net/fib_tests.sh
··· 1534 1534 1535 1535 log_test $ret 0 "ipv6 promote RA route to static" 1536 1536 1537 + # Prepare for RA route with gateway 1538 + $NS_EXEC sysctl -wq net.ipv6.conf.veth1.accept_ra_rt_info_max_plen=64 1539 + 1540 + # Add initial route to cause ECMP merging 1541 + $IP -6 route add 2001:12::/64 via fe80::dead:beef dev veth1 1542 + 1543 + $NS_EXEC ra6 -i veth2 -d 2001:10::1 -R 2001:12::/64#1#120 1544 + 1545 + # Routes are not merged as RA routes are not elegible for ECMP 1546 + check_rt_num 2 "$($IP -6 route list | grep -c "2001:12::/64 via")" 1547 + 1548 + $IP -6 route append 2001:12::/64 via fe80::dead:feeb dev veth1 1549 + 1550 + check_rt_num 2 "$($IP -6 route list | grep -c "nexthop via")" 1551 + 1552 + log_test "$ret" 0 "ipv6 RA route with nexthop do not merge into ECMP with static" 1553 + 1537 1554 set +e 1538 1555 1539 1556 cleanup &> /dev/null