device: refactor container locking for lock-order clarity

Device-side portion of upstream tailscale/wireguard-go e3ac4a0
(device, cmd/check-lockorder: add static analysis tool for lock
ordering); the analyzer itself is not carried in this fork.
This commit is contained in:
Brad Fitzpatrick 2026-04-26 15:02:22 +00:00 committed by 世界
parent 7c3a736cbe
commit 2ad9837e6c
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
6 changed files with 214 additions and 182 deletions

View file

@ -329,7 +329,6 @@ func (table *AllowedIPs) Remove(prefix netip.Prefix, peer *Peer) {
node.remove()
}
// setPeerPrefixes atomically removes all of peer's existing prefixes and adds
// the provided ones.
func (table *AllowedIPs) setPeerPrefixes(peer *Peer, prefixes []netip.Prefix) {