mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-22 08:21:30 +02:00
- Use netip.Addr instead of string IPs in the local resolver's PeerConnectivity and PeerActivator interfaces; extract record addresses as netip.Addr (v4-mapped forms unmapped) and convert to string only at the peer.Status boundary. - Scope warm-up to match-only (non-authoritative) zones so the synthesized private-service records keep warming while plain peer-name lookups in the authoritative peer zone no longer wake every idle peer. - Parse NB_DNS_LAZY_WARMUP_TIMEOUT once in the resolver constructor instead of on every request, and log invalid values. - Stop reusing engine.syncMsgMux on the DNS path: ConnMgr.ActivatePeer is now safe for concurrent use (lazy manager pointer guarded by a dedicated RWMutex; the manager itself is internally synchronized), so network-map processing no longer blocks DNS resolution. - Add SetPeerActivator to the dns.Server interface (no-op on the mock) and drop the *dns.DefaultServer type assertion in the engine. - Drop WireGuard wording from dns/local comments; the layer is transport-agnostic. Tests: authoritative zones never trigger warm-up; warm-up timeout env parsing (valid/invalid/non-positive); extractRecordAddr unmaps v4-mapped record data; dnsPeerActivator skips connected/unknown/ conn-less peers, returns on connect, and releases at the budget when the peer stays idle; ConnMgr.ActivatePeer races the manager lifecycle cleanly under -race.