From eebaa3ac3a6bfcb29e280006ead8ea9554b8a3bf Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Tue, 6 Jul 2021 14:59:00 +0300 Subject: [PATCH] dnsforward: imp code --- internal/dnsforward/dns.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/dnsforward/dns.go b/internal/dnsforward/dns.go index 770ac22538d..120c1d645a6 100644 --- a/internal/dnsforward/dns.go +++ b/internal/dnsforward/dns.go @@ -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