[PR #970] ACL firewall manager fix/improvement #2953

Open
opened 2025-11-20 08:04:30 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/970

State: closed
Merged: Yes


Describe your changes

Fix the issue with rule squashing, it contained an issue when calculating the total amount of IPs in the Peer map (doesn't include offline peers). That is why squashing did not work.
Also, this commit changes the rules apply behavior. Instead policy:

  1. Apply all rules from the network map
  2. Remove all previously applied rules.
    We do:
  3. Apply only new rules
  4. Remove outdated rules

Why the first variant was implemented: when you have a drop policy it is important in which order your rules are and you need a totally clean previous state to apply the new. But in the release, we didn't include a drop policy so we can do this improvement.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/970 **State:** closed **Merged:** Yes --- ## Describe your changes Fix the issue with rule squashing, it contained an issue when calculating the total amount of IPs in the Peer map (doesn't include offline peers). That is why squashing did not work. Also, this commit changes the rules apply behavior. Instead policy: 1. Apply all rules from the network map 2. Remove all previously applied rules. We do: 1. Apply only new rules 2. Remove outdated rules Why the first variant was implemented: when you have a drop policy it is important in which order your rules are and you need a totally clean previous state to apply the new. But in the release, we didn't include a drop policy so we can do this improvement. ## Issue ticket number and link ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
saavagebueno added the pull-request label 2025-11-20 08:04:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2953