controller: CT zone allocation for DGP LSPs enabled ACL.#288
Open
shylou wants to merge 1 commit intoovn-org:branch-25.03from
Open
controller: CT zone allocation for DGP LSPs enabled ACL.#288shylou wants to merge 1 commit intoovn-org:branch-25.03from
shylou wants to merge 1 commit intoovn-org:branch-25.03from
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
[1]5ae7d2c
Reported-at: #264