Skip to content

Conversation

presztak
Copy link
Collaborator

This change adds support for prioritizing allow rules when the default policy for a network or interface is set to allow. By default, the policy is reject, so reject rules have higher priority.
To implement this, the original single port group was replaced with four separate port groups:

  • Ingress (allow-first)
  • Ingress (reject-first)
  • Egress (allow-first)
  • Egress (reject-first)

These groups store rules in the required order, allowing correct rule evaluation based on the default policy.

Fixes: #1833

@presztak presztak force-pushed the acl_allow_order branch 3 times, most recently from f4e0506 to d2316b7 Compare August 11, 2025 09:15
@presztak presztak force-pushed the acl_allow_order branch 4 times, most recently from fd3a6dc to 03ca464 Compare August 22, 2025 13:58
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
@presztak presztak marked this pull request as ready for review August 22, 2025 15:59
@presztak presztak requested a review from stgraber as a code owner August 22, 2025 15:59
Comment on lines 1386 to 1389
ovnnb, _, err := s.OVN()
if err != nil {
return err
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when this runs on a system without configured OVS/OVN?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it will fail with an error saying that it’s unable to connect to OVN. So as solution I'm instantiating ovnnb only if we find ovn network.

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
@stgraber stgraber merged commit acad839 into lxc:main Aug 28, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

ACL should apply allow first when default action is allow
2 participants