From d734ee0d2100071a3073a4c9bf71cb12f88eccac Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 23 Oct 2025 06:14:00 +1100 Subject: [PATCH] ci: compare source tuple instead of only port (#10680) This test is currently flaky on main because it may happen that we first roam from our IPv4 address to the IPv6 one. Therefore, to make the assertion pass we need to check that all flows have a different source tuple and not just a different source port. --- scripts/tests/download-roaming-network.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/tests/download-roaming-network.sh b/scripts/tests/download-roaming-network.sh index f7af12126..deb00de6c 100755 --- a/scripts/tests/download-roaming-network.sh +++ b/scripts/tests/download-roaming-network.sh @@ -54,13 +54,14 @@ for flow in "${flows[@]}"; do assert_eq "$(get_flow_field "$flow" "inner_dst_ip")" "172.21.0.101" done -# Verify different outer_src_port after roaming (network change) +# Verify different source tuple after roaming (network change) # The docker-compose setup uses routers and therefore the source IP is always the router. # But conntrack on the router will allocate a new source port because the binding on the old one is still active after roaming. -original_src_port=$(get_flow_field "${flows[0]}" "outer_src_port") +# To handle roaming between IPv4 and IPv6, we need to compare the entire tuple. +original_src_tuple="$(get_flow_field "${flows[0]}" "outer_src_ip") $(get_flow_field "${flows[0]}" "outer_src_port")" for ((i = 1; i < ${#flows[@]}; i++)); do - next_src_port=$(get_flow_field "${flows[i]}" "outer_src_port") + next_src_tuple="$(get_flow_field "${flows[i]}" "outer_src_ip") $(get_flow_field "${flows[i]}" "outer_src_port")" - assert_ne "$original_src_port" "$next_src_port" + assert_ne "$original_src_tuple" "$next_src_tuple" done