Skip to content

Commit 7ce93d6

Browse files
committed
Merge branch 'selftests-seg6-make-srv6_end_dt4_l3vpn_test-more-robust'
Andrea Mayer says: ==================== selftests: seg6: make srv6_end_dt4_l3vpn_test more robust This pachset aims to improve and make more robust the selftests performed to check whether SRv6 End.DT4 beahvior works as expected under different system configurations. Some Linux distributions enable Deduplication Address Detection and Reverse Path Filtering mechanisms by default which can interfere with SRv6 End.DT4 behavior and cause selftests to fail. The following patches improve selftests for End.DT4 by taking these two mechanisms into account. Specifically: - patch 1/2: selftests: seg6: disable DAD on IPv6 router cfg for srv6_end_dt4_l3vpn_test - patch 2/2: selftets: seg6: disable rp_filter by default in srv6_end_dt4_l3vpn_test ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 6e27831 + f97b840 commit 7ce93d6

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,14 @@ setup_rt_networking()
232232
local nsname=rt-${rt}
233233

234234
ip netns add ${nsname}
235+
236+
ip netns exec ${nsname} sysctl -wq net.ipv6.conf.all.accept_dad=0
237+
ip netns exec ${nsname} sysctl -wq net.ipv6.conf.default.accept_dad=0
238+
235239
ip link set veth-rt-${rt} netns ${nsname}
236240
ip -netns ${nsname} link set veth-rt-${rt} name veth0
237241

238-
ip -netns ${nsname} addr add ${IPv6_RT_NETWORK}::${rt}/64 dev veth0
242+
ip -netns ${nsname} addr add ${IPv6_RT_NETWORK}::${rt}/64 dev veth0 nodad
239243
ip -netns ${nsname} link set veth0 up
240244
ip -netns ${nsname} link set lo up
241245

@@ -254,6 +258,12 @@ setup_hs()
254258

255259
# set the networking for the host
256260
ip netns add ${hsname}
261+
262+
# disable the rp_filter otherwise the kernel gets confused about how
263+
# to route decap ipv4 packets.
264+
ip netns exec ${rtname} sysctl -wq net.ipv4.conf.all.rp_filter=0
265+
ip netns exec ${rtname} sysctl -wq net.ipv4.conf.default.rp_filter=0
266+
257267
ip -netns ${hsname} link add veth0 type veth peer name ${rtveth}
258268
ip -netns ${hsname} link set ${rtveth} netns ${rtname}
259269
ip -netns ${hsname} addr add ${IPv4_HS_NETWORK}.${hs}/24 dev veth0
@@ -272,11 +282,6 @@ setup_hs()
272282

273283
ip netns exec ${rtname} sysctl -wq net.ipv4.conf.${rtveth}.proxy_arp=1
274284

275-
# disable the rp_filter otherwise the kernel gets confused about how
276-
# to route decap ipv4 packets.
277-
ip netns exec ${rtname} sysctl -wq net.ipv4.conf.all.rp_filter=0
278-
ip netns exec ${rtname} sysctl -wq net.ipv4.conf.${rtveth}.rp_filter=0
279-
280285
ip netns exec ${rtname} sh -c "echo 1 > /proc/sys/net/vrf/strict_mode"
281286
}
282287

0 commit comments

Comments
 (0)