Skip to content

Commit

Permalink
removed for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
rejain456 committed Jan 10, 2025
1 parent 9ca7d88 commit ab735cc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cni/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,7 @@ func (plugin *NetPlugin) Add(args *cniSkel.CmdArgs) error {
}

policies := cni.GetPoliciesFromNwCfg(nwCfg.AdditionalArgs)
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()))

Expand All @@ -619,6 +617,7 @@ func (plugin *NetPlugin) Add(args *cniSkel.CmdArgs) error {

natInfo := getNATInfo(nwCfg, options[network.SNATIPKey], enableSnatForDNS)
networkID, _ := plugin.getNetworkID(args.Netns, &ifInfo, nwCfg)
policies = append(policies, ipamAddResult.interfaceInfo[key].EndpointPolicies...)

createEpInfoOpt := createEpInfoOpt{
nwCfg: nwCfg,
Expand Down

0 comments on commit ab735cc

Please sign in to comment.