Skip to content

Commit

Permalink
Update pkg/netpol/eval/internal/k8s/adminnetpol.go
Browse files Browse the repository at this point in the history
Co-authored-by: Adi Sosnovich <[email protected]>
  • Loading branch information
shireenf-ibm and adisos authored Dec 11, 2024
1 parent d18f19e commit 295b9f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/netpol/eval/internal/k8s/adminnetpol.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,8 @@ func isIPv6Cidr(cidr apisv1a.CIDR) (bool, error) {
if err != nil {
return false, err
}
ip := ipNet.IP
// if the IP is IPv6, return true
return ip.To4() == nil, nil
return ipNet.IP.To4() == nil, nil
}

// rulePeersReferencedNetworks returns a list of IPBlocks representing the CIDRs referenced by the given rulePeers' Networks field.
Expand Down

0 comments on commit 295b9f5

Please sign in to comment.