mirror of
https://github.com/jwhited/wgsd.git
synced 2025-11-26 21:35:34 +08:00
trivial fixes
This commit is contained in:
2
wgsd.go
2
wgsd.go
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user