cmd/natc: fix nil pointer

Fixes #13432

Signed-off-by: Fran Bull <fran@tailscale.com>
pull/13434/head
Fran Bull 2 months ago committed by franbull
parent 436a0784a2
commit 7d16af8d95

@ -489,6 +489,9 @@ type perPeerState struct {
func (ps *perPeerState) domainForIP(ip netip.Addr) (_ string, ok bool) {
ps.mu.Lock()
defer ps.mu.Unlock()
if ps.addrToDomain == nil {
return "", false
}
return ps.addrToDomain.Lookup(ip)
}

Loading…
Cancel
Save