fix expandPortsAndRanges

This commit is contained in:
Pascal Fischer
2025-10-09 22:22:01 +02:00
committed by crn4
parent 5098410e66
commit 0fdf8138f2

View File

@@ -312,7 +312,7 @@ func (a *Account) validatePostureChecksOnPeer(ctx context.Context, sourcePosture
// expandPortsAndRanges expands Ports and PortRanges of a rule into individual firewall rules
func expandPortsAndRanges(base FirewallRule, rule *PolicyRule, peer *nbpeer.Peer) []*FirewallRule {
var expanded []*FirewallRule
expanded := make([]*FirewallRule, 0, len(rule.Ports)+len(rule.PortRanges))
if len(rule.Ports) > 0 {
for _, port := range rule.Ports {