mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-29 05:18:48 -05:00
Fix prefix length comparison bug in AutoApprovers route evaluation (#862)
This commit is contained in:
@@ -125,7 +125,7 @@ func (autoApprovers *AutoApprovers) GetRouteApprovers(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if autoApprovedPrefix.Bits() >= prefix.Bits() &&
|
||||
if prefix.Bits() >= autoApprovedPrefix.Bits() &&
|
||||
autoApprovedPrefix.Contains(prefix.Masked().Addr()) {
|
||||
approverAliases = append(approverAliases, autoApproverAliases...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user