Skip to content

controller: CT zone allocation for DGP LSPs enabled ACL.#288

Open
shylou wants to merge 1 commit intoovn-org:branch-25.03from
shylou:branch-25.03
Open

controller: CT zone allocation for DGP LSPs enabled ACL.#288
shylou wants to merge 1 commit intoovn-org:branch-25.03from
shylou:branch-25.03

Conversation

@shylou
Copy link
Contributor

@shylou shylou commented Dec 9, 2025

Consider the case of stateful Firewall for N-S traffic:

PUBLIC---S1-(S1-R1)---------(R1-S1)-R1 -------- S2 ---- VM1

Configuration:

ovn-nbctl pg-add pg_dgw
ovn-nbctl pg-set-ports pg_dgw S1-R1
ovn-nbctl acl-add pg_dgw from-lport 2000 "inport == @pg_dgw && ip4 && icmp4" allow-related ovn-nbctl acl-add pg_dgw from-lport 1000 "inport == @pg_dgw && ip4" drop ovn-nbctl acl-add pg_dgw to-lport 1000 "outport == @pg_dgw && ip4" drop ovn-nbctl lsp-set-options S1-R1 router-port=R1-S1 enable_router_port_acl=true

VM1 pings external network.

Through this patch[1], the ovn-controller assigned a CT zone ID to the localnet LSP but not the dgw LSP.

This caused ACL failures: ICMP reply packets from external networks performed CT lookups in the wrong zone, couldn't match established connections, and were incorrectly dropped.

This commit enables CT zone allocation for patch ports that correspond to router gateway ports when enable_router_port_acl=true is set.

Changes:

  • northd: Add enable-router-port-acl option to southbound port binding
  • binding: Handle patch port CT zone requirements in local_lports
  • controller: Add/Delete CT zone for patch ports enabled/disabled ACL

[1]5ae7d2c

Reported-at: #264

Consider the case of stateful Firewall for N-S traffic:

PUBLIC---S1-(S1-R1)---------(R1-S1)-R1 -------- S2 ---- VM1

Configuration:

ovn-nbctl pg-add pg_dgw
ovn-nbctl pg-set-ports pg_dgw S1-R1
ovn-nbctl acl-add pg_dgw from-lport 2000 "inport == @pg_dgw && ip4  && icmp4" allow-related
ovn-nbctl acl-add pg_dgw from-lport 1000 "inport == @pg_dgw && ip4" drop
ovn-nbctl acl-add pg_dgw to-lport 1000 "outport == @pg_dgw && ip4" drop
ovn-nbctl lsp-set-options S1-R1 router-port=R1-S1 enable_router_port_acl=true

VM1 pings external network.

Through this patch[1], the ovn-controller assigned a CT zone ID
to the localnet LSP but not the dgw LSP.

This caused ACL failures: ICMP reply packets from external networks
performed CT lookups in the wrong zone, couldn't match established
connections, and were incorrectly dropped.

This commit enables CT zone allocation for patch ports that correspond
to router gateway ports when enable_router_port_acl=true is set.

Changes:
- northd: Add enable-router-port-acl option to southbound port binding
- binding: Handle patch port CT zone requirements in local_lports
- controller: Add/Delete CT zone for patch ports enabled/disabled ACL

[1]ovn-org@5ae7d2c

Reported-at: ovn-org#264
Signed-off-by: Xie Liu <liushyshy@gmail.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant