Skip to content

Commit e71a2e5

Browse files
committed
Merge branch 'main' into ssh-rewrite
2 parents f7d8bba + b45284f commit e71a2e5

File tree

11 files changed

+759
-65
lines changed

11 files changed

+759
-65
lines changed

client/internal/acl/manager.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,15 @@ func (d *DefaultManager) getPeerRuleID(
373373
//
374374
// We zeroed this to notify squash function that this protocol can't be squashed.
375375
addRuleToCalculationMap := func(i int, r *mgmProto.FirewallRule, protocols map[mgmProto.RuleProtocol]*protoMatch) {
376-
drop := r.Action == mgmProto.RuleAction_DROP || r.Port != ""
377-
if drop {
376+
hasPortRestrictions := r.Action == mgmProto.RuleAction_DROP ||
377+
r.Port != "" || !portInfoEmpty(r.PortInfo)
378+
379+
if hasPortRestrictions {
380+
// Don't squash rules with port restrictions
378381
protocols[r.Protocol] = &protoMatch{ips: map[string]int{}}
379382
return
380383
}
384+
381385
if _, ok := protocols[r.Protocol]; !ok {
382386
protocols[r.Protocol] = &protoMatch{
383387
ips: map[string]int{},

0 commit comments

Comments
 (0)