mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-22 19:58:17 +00:00
Fix CIDR calculation in expandACLPeerAddr
This commit is contained in:
4
acls.go
4
acls.go
@@ -213,11 +213,11 @@ func expandACLPeerAddr(srcIP string) []string {
|
||||
return []string{from.String()}
|
||||
}
|
||||
|
||||
for from != too {
|
||||
for from != too && from.Less(too) {
|
||||
addrs = append(addrs, from.String())
|
||||
|
||||
from = from.Next()
|
||||
}
|
||||
addrs = append(addrs, too.String()) // Add the last IP address in the range
|
||||
|
||||
return addrs
|
||||
}
|
||||
|
Reference in New Issue
Block a user