Skip to content

Commit

Permalink
dnsforward: imp code
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Jul 6, 2021
1 parent 7591a3b commit eebaa3a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/dnsforward/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,13 @@ func (s *Server) ipToHost(ip net.IP) (host string, ok bool) {
return "", false
}

var typOK bool
if host, typOK = v.(string); !typOK {
if host, ok = v.(string); !ok {
log.Error("dns: bad type %T in tableIPToHost for %s", v, ip)

return "", false
}

return host, ok
return host, true
}

// Respond to PTR requests if the target IP is leased by our DHCP server and the
Expand Down

0 comments on commit eebaa3a

Please sign in to comment.