diff --git a/random_local_ip.go b/random_local_ip.go index 8c4f31d..9e6c99d 100644 --- a/random_local_ip.go +++ b/random_local_ip.go @@ -49,7 +49,7 @@ func (c *CustomHTTPClient) getAvailableIPs(IPv6AnyIP bool) (IPs []net.IP, err er newIPv4 := make([]net.IPNet, 0) newIPv6 := make([]net.IPNet, 0) for _, iface := range interfaces { - if strings.Contains(iface.Name, "docker") || strings.Contains(iface.Flags.String(), "pointopoint") || !strings.Contains(iface.Flags.String(), "up") { + if strings.Contains(iface.Name, "docker") || strings.Contains(iface.Flags.String(), "pointtopoint") || !strings.Contains(iface.Flags.String(), "up") { continue } diff --git a/random_local_ip_test.go b/random_local_ip_test.go index a7b2f98..4eb7cd5 100644 --- a/random_local_ip_test.go +++ b/random_local_ip_test.go @@ -361,7 +361,7 @@ func TestGetAvailableIPsAnyIP(t *testing.T) { newIPv4 := make([]net.IPNet, 0) newIPv6 := make([]net.IPNet, 0) for _, iface := range interfaces { - if strings.Contains(iface.Name, "docker") || !strings.Contains(iface.Flags.String(), "broadcast") || !strings.Contains(iface.Flags.String(), "up") { + if strings.Contains(iface.Name, "docker") || strings.Contains(iface.Flags.String(), "pointtopoint") || !strings.Contains(iface.Flags.String(), "up") { continue } else { t.Logf("Interface: %v", iface.Name)