trivial fixes

This commit is contained in:
Jordan Whited
2020-05-15 13:01:58 -07:00
parent 53c1794798
commit 5c7c582a2a
2 changed files with 7 additions and 2 deletions

View File

@@ -142,7 +142,7 @@ func (p *WGSD) ServeDNS(ctx context.Context, w dns.ResponseWriter,
}
func getHostRR(pubKey, zone string, endpoint *net.UDPAddr) dns.RR {
if endpoint.IP == nil {
if endpoint == nil || endpoint.IP == nil {
return nil
}
name := fmt.Sprintf("%s.%s", strings.ToUpper(pubKey), zone)