Skip to content

Commit

Permalink
renaming a func
Browse files Browse the repository at this point in the history
  • Loading branch information
shireenf-ibm committed Dec 11, 2024
1 parent 8f3d700 commit 43f195a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/netpol/eval/internal/k8s/adminnetpol.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (anp *AdminNetworkPolicy) GetReferencedIPBlocks() ([]*netset.IPBlock, error
res := []*netset.IPBlock{}
// in ANP only egress rules may contains ip addresses
for _, rule := range anp.Spec.Egress {
ruleRes, err := rulePeersReferencedNetworks(rule.To)
ruleRes, err := rulePeersReferencedIPBlocks(rule.To)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -606,7 +606,7 @@ func isIPv6Cidr(cidr apisv1a.CIDR) (bool, error) {
}

// rulePeersReferencedNetworks returns a list of IPBlocks representing the CIDRs referenced by the given rulePeers' Networks field.
func rulePeersReferencedNetworks(rulePeers []apisv1a.AdminNetworkPolicyEgressPeer) ([]*netset.IPBlock, error) {
func rulePeersReferencedIPBlocks(rulePeers []apisv1a.AdminNetworkPolicyEgressPeer) ([]*netset.IPBlock, error) {
res := []*netset.IPBlock{}
for _, peerObj := range rulePeers {
if peerObj.Networks != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/netpol/eval/internal/k8s/baseline_admin_netpol.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (banp *BaselineAdminNetworkPolicy) GetReferencedIPBlocks() ([]*netset.IPBlo
res := []*netset.IPBlock{}
// in BANP only egress rules may contain ip addresses
for _, rule := range banp.Spec.Egress {
ruleRes, err := rulePeersReferencedNetworks(rule.To)
ruleRes, err := rulePeersReferencedIPBlocks(rule.To)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 43f195a

Please sign in to comment.