Skip to content

Commit baf31a3

Browse files
committed
updating to fix github checks
1 parent ed09360 commit baf31a3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cns/middlewares/k8sSwiftV2.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ func (k *K8sSWIFTv2Middleware) IPConfigsRequestHandlerWrapper(defaultHandler, fa
5959
}
6060

6161
// ipConfigsResp has infra IP configs -> if defaultDenyACLbool is enabled, add the default deny acl's pn the infra IP configs
62-
for _, ipInfo := range ipConfigsResp.PodIPInfo {
62+
for i := range ipConfigsResp.PodIPInfo {
63+
ipInfo := &ipConfigsResp.PodIPInfo[i]
6364
// there will be no pod connectivity to and from those pods
6465
if defaultDenyACLbool && ipInfo.NICType == cns.InfraNIC {
65-
err = addDefaultDenyACL(&ipInfo)
66+
err = addDefaultDenyACL(ipInfo)
6667
if err != nil {
6768
logger.Errorf("failed to add default deny acl's for pod %v with err %v", podInfo.Name(), err)
6869
}

cns/middlewares/k8sSwiftV2_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (k *K8sSWIFTv2Middleware) addDefaultRoute(podIPInfo *cns.PodIpInfo, gwIP st
6464
}
6565

6666
// append the default deny acl's to the list defaultDenyACL field in podIpInfo
67-
func addDefaultDenyACL(podIpInfo *cns.PodIpInfo) error {
67+
func addDefaultDenyACL(podIPInfo *cns.PodIpInfo) error {
6868
blockEgressACL, err := getDefaultDenyACLPolicy(hcn.DirectionTypeOut)
6969
if err != nil {
7070
return errors.Wrap(err, "Failed to create default deny ACL policy egress")
@@ -86,7 +86,7 @@ func addDefaultDenyACL(podIpInfo *cns.PodIpInfo) error {
8686
},
8787
}
8888

89-
podIpInfo.DefaultDenyACL = append(podIpInfo.DefaultDenyACL, additionalArgs...)
89+
podIPInfo.DefaultDenyACL = append(podIPInfo.DefaultDenyACL, additionalArgs...)
9090

9191
return nil
9292
}

0 commit comments

Comments
 (0)