From dbe06236244a472a47ac7d91cb0ddaafd21e0573 Mon Sep 17 00:00:00 2001 From: Jordan Whited Date: Fri, 15 May 2020 13:15:42 -0700 Subject: [PATCH] don't return SRV answer if endpoint is nil --- wgsd.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wgsd.go b/wgsd.go index 0e27bb7..20fcfed 100644 --- a/wgsd.go +++ b/wgsd.go @@ -76,6 +76,9 @@ func (p *WGSD) ServeDNS(ctx context.Context, w dns.ResponseWriter, // TODO: handle SOA case name == spPrefix && qtype == dns.TypePTR: for _, peer := range device.Peers { + if peer.Endpoint == nil { + continue + } m.Answer = append(m.Answer, &dns.PTR{ Hdr: dns.RR_Header{ Name: state.Name(),