Skip to content

Conversation

lixmal
Copy link
Collaborator

@lixmal lixmal commented Oct 16, 2025

Describe your changes

Issue ticket number and link

Stack

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)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

@Copilot Copilot AI review requested due to automatic review settings October 16, 2025 15:25
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the rule squashing logic from the ACL manager, which previously attempted to optimize firewall rules by consolidating multiple per-peer rules into single wildcard rules when they covered all peers in the network.

  • Removal of the squashAcceptRules method and its supporting logic
  • Simplification of the applyPeerACLs method to use firewall rules directly from the network map
  • Deletion of comprehensive test coverage for rule squashing scenarios

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
client/internal/acl/manager.go Removed squashAcceptRules method (~145 lines), protoMatch struct, and simplified applyPeerACLs to use rules directly without squashing logic
client/internal/acl/manager_test.go Removed all test functions related to rule squashing (~492 lines) including tests for various port restriction scenarios and protocol-specific squashing behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

lixmal and others added 2 commits October 16, 2025 17:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

@lixmal lixmal merged commit 3cdb10c into main Oct 17, 2025
36 checks passed
@lixmal lixmal deleted the remove-squashing branch October 17, 2025 09:09
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.

2 participants