mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-19 14:52:35 +09:00
Fix IPv6 in ACLs (#1339)
This commit is contained in:
14
machine.go
14
machine.go
@@ -1267,3 +1267,17 @@ func (h *Headscale) GenerateGivenName(machineKey string, suppliedName string) (s
|
||||
|
||||
return givenName, nil
|
||||
}
|
||||
|
||||
func (machines Machines) FilterByIP(ip netip.Addr) Machines {
|
||||
found := make(Machines, 0)
|
||||
|
||||
for _, machine := range machines {
|
||||
for _, mIP := range machine.IPAddresses {
|
||||
if ip == mIP {
|
||||
found = append(found, machine)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return found
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user