diff --git a/cni/network/network.go b/cni/network/network.go index bb87a07177..378084bc03 100644 --- a/cni/network/network.go +++ b/cni/network/network.go @@ -590,8 +590,9 @@ func (plugin *NetPlugin) Add(args *cniSkel.CmdArgs) error { } policies := cni.GetPoliciesFromNwCfg(nwCfg.AdditionalArgs) - policies = append(policies, ipamAddResult.interfaceInfo[string(cns.InfraNIC)].EndpointPolicies...) - + for key := range ipamAddResult.interfaceInfo { + policies = append(policies, ipamAddResult.interfaceInfo[key].EndpointPolicies...) + } // moved to addIpamInvoker // sendEvent(plugin, fmt.Sprintf("Allocated IPAddress from ipam interface: %+v", ipamAddResult.PrettyString()))