Skip to content

Commit

Permalink
x64: nil ptr with logging ans4
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Oct 4, 2023
1 parent 85db131 commit 004fde0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions intra/x64/dns64.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 004fde0

Please sign in to comment.