Fix IPv6 in ACLs (#1339)
This commit is contained in:
parent
9836b097a4
commit
5e74ca9414
9 changed files with 816 additions and 208 deletions
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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue