Skip to content

Commit

Permalink
tests: fix ipv6 tunnel config specification of af-unspec
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hopps <[email protected]>
  • Loading branch information
choppsv1 committed Sep 4, 2024
1 parent 8bc37e5 commit 50f62f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,9 @@ async def setup_policy_tun(
else:
await cleanup_config(unet, r1only=r1only, ipv4=ipv4, ipv6=ipv6)

if bool(tun_ipv6) != bool(ipv6):
if (tun_ipv6 and ipv4) or (not tun_ipv6 and ipv6):
esp_flags = "af-unspec " + esp_flags

if esp_flags:
esp_flags = "flag " + esp_flags

Expand Down Expand Up @@ -810,8 +811,9 @@ async def setup_routed_tun(
else:
await cleanup_config(unet, r1only=r1only, ipv4=ipv4, ipv6=ipv6)

if bool(tun_ipv6) != bool(ipv6):
if (tun_ipv6 and ipv4) or (not tun_ipv6 and ipv6):
esp_flags = "af-unspec " + esp_flags

if esp_flags:
esp_flags = "flag " + esp_flags

Expand Down

0 comments on commit 50f62f0

Please sign in to comment.