File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -590,9 +590,7 @@ func (plugin *NetPlugin) Add(args *cniSkel.CmdArgs) error {
590590 }
591591
592592 policies := cni .GetPoliciesFromNwCfg (nwCfg .AdditionalArgs )
593- for key := range ipamAddResult .interfaceInfo {
594- policies = append (policies , ipamAddResult .interfaceInfo [key ].EndpointPolicies ... )
595- }
593+
596594 // moved to addIpamInvoker
597595 // sendEvent(plugin, fmt.Sprintf("Allocated IPAddress from ipam interface: %+v", ipamAddResult.PrettyString()))
598596
@@ -619,6 +617,7 @@ func (plugin *NetPlugin) Add(args *cniSkel.CmdArgs) error {
619617
620618 natInfo := getNATInfo (nwCfg , options [network .SNATIPKey ], enableSnatForDNS )
621619 networkID , _ := plugin .getNetworkID (args .Netns , & ifInfo , nwCfg )
620+ policies = append (policies , ipamAddResult .interfaceInfo [key ].EndpointPolicies ... )
622621
623622 createEpInfoOpt := createEpInfoOpt {
624623 nwCfg : nwCfg ,
You can’t perform that action at this time.
0 commit comments