Skip to content

Commit

Permalink
dnsforward: fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Jul 6, 2021
1 parent 4b5a66e commit 7591a3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/dnsforward/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ func (s *Server) ipToHost(ip net.IP) (host string, ok bool) {

var v interface{}
v, ok = s.tableIPToHost.Get(ip)
if !ok {
return "", false
}

var typOK bool
if host, typOK = v.(string); !typOK {
Expand Down

0 comments on commit 7591a3b

Please sign in to comment.