File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -616,7 +616,6 @@ func (plugin *NetPlugin) Add(args *cniSkel.CmdArgs) error {
616616
617617 natInfo := getNATInfo (nwCfg , options [network .SNATIPKey ], enableSnatForDNS )
618618 networkID , _ := plugin .getNetworkID (args .Netns , & ifInfo , nwCfg )
619- policies = append (policies , ipamAddResult .interfaceInfo [key ].EndpointPolicies ... )
620619
621620 createEpInfoOpt := createEpInfoOpt {
622621 nwCfg : nwCfg ,
@@ -834,6 +833,10 @@ func (plugin *NetPlugin) createEpInfo(opt *createEpInfoOpt) (*network.EndpointIn
834833 // create endpoint policies by appending to network policies
835834 // the value passed into NetworkPolicies should be unaffected since we reassign here
836835 opt .policies = append (opt .policies , endpointPolicies ... )
836+
837+ // appends default deny endpoint policies if infra nic and default deny bool is enabled
838+ opt .policies = append (opt .policies , opt .ifInfo .EndpointPolicies ... )
839+
837840 endpointInfo .EndpointPolicies = opt .policies
838841 // add even more endpoint policies
839842 epPolicies , err := getPoliciesFromRuntimeCfg (opt .nwCfg , opt .ipamAddResult .ipv6Enabled ) // not specific to delegated or infra
You can’t perform that action at this time.
0 commit comments