From 004fde04cba1d6372387fe282c0010bb4848d4dd Mon Sep 17 00:00:00 2001 From: Murtaza Aliakbar Date: Wed, 4 Oct 2023 15:41:12 +0530 Subject: [PATCH] x64: nil ptr with logging ans4 --- intra/x64/dns64.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/intra/x64/dns64.go b/intra/x64/dns64.go index c5688f85..00052c13 100644 --- a/intra/x64/dns64.go +++ b/intra/x64/dns64.go @@ -179,8 +179,10 @@ func (d *dns64) eval(id string, force64 bool, og []byte, r dnsx.Transport) []byt ans4, err := d.query64(ansin, r) rgood := xdns.HasRcodeSuccess(ans4) - if err != nil || ans4 == nil || len(ans4.Answer) <= 0 || xdns.AQuadAUnspecified(ans4) { - log.W("dns64: query(n:%s / a:%d) to resolver(%s) rgood(%t), err(%v)", qname, len(ans4.Answer), id, rgood, err) + hasans := xdns.HasAnyAnswer(ans4) + ans0000 := xdns.AQuadAUnspecified(ans4) + if err != nil || hasans || ans0000 { + log.W("dns64: query(n:%s / a? %t) to resolver(%s), code(good? %t / blocked? %t), err(%v)", qname, hasans, id, rgood, ans0000, err) return nil }