From 13e1e36ba3447810f370dfeb4d4b7c38bc01d21c Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 21 Dec 2018 11:28:00 +0100 Subject: [PATCH] RESPSTATUS_NO_NAME when no answers found (so for NODATA answers too) --- src/util-internal.c | 5 +++-- stubby | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/util-internal.c b/src/util-internal.c index 437a9679..5b007c0b 100644 --- a/src/util-internal.c +++ b/src/util-internal.c @@ -1124,6 +1124,7 @@ _getdns_create_getdns_response(getdns_dns_req *completed_request) int nsecure = 0, ninsecure = 0, nindeterminate = 0, nbogus = 0; getdns_dict *netreq_debug; _srvs srvs = { 0, 0, NULL }; + _getdns_rrset_spc answer_spc; /* info (bools) about dns_req */ int dnssec_return_status; @@ -1235,8 +1236,8 @@ _getdns_create_getdns_response(getdns_dns_req *completed_request) /* TODO: Check instead if canonical_name for request_type * is in the answer section. */ - if (GLDNS_RCODE_NOERROR == - GLDNS_RCODE_WIRE(netreq->response)) + if (_getdns_rrset_answer(&answer_spc, netreq->response + , netreq->response_len)) nanswers++; if (dnssec_return_status || diff --git a/stubby b/stubby index 919b7d91..b04882ad 160000 --- a/stubby +++ b/stubby @@ -1 +1 @@ -Subproject commit 919b7d914ca618f4a843464d5825383f45809f3e +Subproject commit b04882ad76cc2efdba6238f59e233844e4223908