From 729890d847efa537015b7761fc53782272f9844d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20=22Pisco=22=20Fernandes?= Date: Mon, 26 Jun 2023 12:33:43 +0100 Subject: [PATCH] TUN-6011: Remove docker networks from ICMP Proxy test --- ingress/origin_icmp_proxy_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ingress/origin_icmp_proxy_test.go b/ingress/origin_icmp_proxy_test.go index ae9f54b9..268aaf4a 100644 --- a/ingress/origin_icmp_proxy_test.go +++ b/ingress/origin_icmp_proxy_test.go @@ -390,15 +390,16 @@ func getLocalIPs(t *testing.T, ipv4 bool) []netip.Addr { require.NoError(t, err) localIPs := []netip.Addr{} for _, i := range interfaces { - // Skip TUN devices - if strings.Contains(i.Name, "tun") { + // Skip TUN devices, and Docker Networks + if strings.Contains(i.Name, "tun") || strings.Contains(i.Name, "docker") || strings.HasPrefix(i.Name, "br-") { continue } addrs, err := i.Addrs() require.NoError(t, err) for _, addr := range addrs { if ipnet, ok := addr.(*net.IPNet); ok && (ipnet.IP.IsPrivate() || ipnet.IP.IsLoopback()) { - if (ipv4 && ipnet.IP.To4() != nil) || (!ipv4 && ipnet.IP.To4() == nil) { + // TODO DEVTOOLS-12514: We only run the IPv6 against the loopback interface due to issues on the CI runners. + if (ipv4 && ipnet.IP.To4() != nil) || (!ipv4 && ipnet.IP.To4() == nil && ipnet.IP.IsLoopback()) { localIPs = append(localIPs, netip.MustParseAddr(ipnet.IP.String())) } }