Skip to content

Commit 50f62f0

Browse files
committed
tests: fix ipv6 tunnel config specification of af-unspec
Signed-off-by: Christian Hopps <[email protected]>
1 parent 8bc37e5 commit 50f62f0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/common/config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,9 @@ async def setup_policy_tun(
580580
else:
581581
await cleanup_config(unet, r1only=r1only, ipv4=ipv4, ipv6=ipv6)
582582

583-
if bool(tun_ipv6) != bool(ipv6):
583+
if (tun_ipv6 and ipv4) or (not tun_ipv6 and ipv6):
584584
esp_flags = "af-unspec " + esp_flags
585+
585586
if esp_flags:
586587
esp_flags = "flag " + esp_flags
587588

@@ -810,8 +811,9 @@ async def setup_routed_tun(
810811
else:
811812
await cleanup_config(unet, r1only=r1only, ipv4=ipv4, ipv6=ipv6)
812813

813-
if bool(tun_ipv6) != bool(ipv6):
814+
if (tun_ipv6 and ipv4) or (not tun_ipv6 and ipv6):
814815
esp_flags = "af-unspec " + esp_flags
816+
815817
if esp_flags:
816818
esp_flags = "flag " + esp_flags
817819

0 commit comments

Comments
 (0)