mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-26 12:26:05 -05:00
fix: free ips from usedIps ipset on DeleteNode
This commit is contained in:
committed by
Kristoffer Dalby
parent
6d24afba1c
commit
299cef4e99
@@ -341,3 +341,12 @@ func (db *HSDatabase) BackfillNodeIPs(i *IPAllocator) ([]string, error) {
|
||||
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (i *IPAllocator) FreeIPs(ips []netip.Addr) {
|
||||
i.mu.Lock()
|
||||
defer i.mu.Unlock()
|
||||
|
||||
for _, ip := range ips {
|
||||
i.usedIPs.Remove(ip)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user