mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
cmd/natc: fix nil pointer
Fixes #13432 Signed-off-by: Fran Bull <fran@tailscale.com>
This commit is contained in:
parent
436a0784a2
commit
7d16af8d95
@ -489,6 +489,9 @@ type perPeerState struct {
|
|||||||
func (ps *perPeerState) domainForIP(ip netip.Addr) (_ string, ok bool) {
|
func (ps *perPeerState) domainForIP(ip netip.Addr) (_ string, ok bool) {
|
||||||
ps.mu.Lock()
|
ps.mu.Lock()
|
||||||
defer ps.mu.Unlock()
|
defer ps.mu.Unlock()
|
||||||
|
if ps.addrToDomain == nil {
|
||||||
|
return "", false
|
||||||
|
}
|
||||||
return ps.addrToDomain.Lookup(ip)
|
return ps.addrToDomain.Lookup(ip)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user