Skip to content

Commit bdf6c87

Browse files
committed
Enhance ACNP applied to NodePort Service
Signed-off-by: graysonwu <wgrayson@vmware.com>
1 parent e7486d5 commit bdf6c87

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/agent/openflow/pipeline.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2113,7 +2113,7 @@ func (f *featureNetworkPolicy) ingressClassifierFlows() []binding.Flow {
21132113
Action().GotoTable(IngressMetricTable.GetID()).
21142114
Done(),
21152115
}
2116-
if f.proxyAll {
2116+
if f.enableAntreaPolicy && f.proxyAll {
21172117
// This generates the flow to match the NodePort Service packets and forward them to AntreaPolicyIngressRuleTable.
21182118
// Policies applied on NodePort Service will be enforced in AntreaPolicyIngressRuleTable.
21192119
flows = append(flows, IngressSecurityClassifierTable.ofTable.BuildFlow(priorityNormal+1).

test/e2e/antreapolicy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3734,7 +3734,7 @@ func testACNPNodePortServiceSupport(t *testing.T, data *TestData) {
37343734
testcases := []podToAddrTestStep{
37353735
{
37363736
Pod(fmt.Sprintf("%s/%s", data.testNamespace, clientName)),
3737-
nodeIP(1),
3737+
nodeIP(0),
37383738
svc1.Spec.Ports[0].NodePort,
37393739
Rejected,
37403740
},

0 commit comments

Comments
 (0)