From 540f8694fca206d287278494495309cb1edbd7e8 Mon Sep 17 00:00:00 2001 From: fangdingjun Date: Thu, 22 Dec 2016 15:13:40 +0800 Subject: [PATCH] fix blacklist check --- handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handler.go b/handler.go index e70cce3..5cb26ee 100644 --- a/handler.go +++ b/handler.go @@ -130,9 +130,9 @@ func (h *dnsHandler) inBlacklist(m *dns.Msg) bool { var ip string for _, rr := range m.Answer { if a, ok := rr.(*dns.A); ok { - ip = a.String() + ip = a.A.String() } else if aaaa, ok := rr.(*dns.AAAA); ok { - ip = aaaa.String() + ip = aaaa.AAAA.String() } else { ip = "" }