Skip to content

Commit ed09360

Browse files
committed
resolved pr comments
1 parent b4534d4 commit ed09360

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cns/middlewares/k8sSwiftV2.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ 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 i := range ipConfigsResp.PodIPInfo {
63-
ipInfo := &ipConfigsResp.PodIPInfo[i]
62+
for _, ipInfo := range ipConfigsResp.PodIPInfo {
6463
// there will be no pod connectivity to and from those pods
6564
if defaultDenyACLbool && ipInfo.NICType == cns.InfraNIC {
66-
err = addDefaultDenyACL(ipInfo)
65+
err = addDefaultDenyACL(&ipInfo)
6766
if err != nil {
6867
logger.Errorf("failed to add default deny acl's for pod %v with err %v", podInfo.Name(), err)
6968
}
69+
break
7070
}
7171
}
7272

0 commit comments

Comments
 (0)