fix blacklist check

main
fangdingjun 8 years ago
parent 1b5cf73385
commit 540f8694fc

@ -130,9 +130,9 @@ func (h *dnsHandler) inBlacklist(m *dns.Msg) bool {
var ip string var ip string
for _, rr := range m.Answer { for _, rr := range m.Answer {
if a, ok := rr.(*dns.A); ok { if a, ok := rr.(*dns.A); ok {
ip = a.String() ip = a.A.String()
} else if aaaa, ok := rr.(*dns.AAAA); ok { } else if aaaa, ok := rr.(*dns.AAAA); ok {
ip = aaaa.String() ip = aaaa.AAAA.String()
} else { } else {
ip = "" ip = ""
} }

Loading…
Cancel
Save