Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions plugins/aws-appmesh/config/netconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,13 @@ func isValidIPAddressOrCIDR(address string) (string, bool) {
return "", false
}
}

// There's no To6() method in the `net` package. Instead, just check that
// it's not a valid `v4` IP.

if ip.To4() != nil {
return ipv4Proto, true
}
return ipv6Proto, true

if ip.To16() != nil {
return ipv6Proto, true
}
return "", false
}