]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix that minimal-responses does not remove addresses from a priming
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 22 Oct 2020 07:26:27 +0000 (09:26 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 22 Oct 2020 07:26:27 +0000 (09:26 +0200)
  query response.

doc/Changelog
util/data/msgencode.c

index 776643c46571ba5e8f9e603ff3f1a27d54c7a9f3..1201081d2d878d4f4a6c7d7b481471813fc9bd84 100644 (file)
@@ -1,6 +1,8 @@
 22 October 2020: Wouter
        - Fix #333: Unbound Segmentation Fault w/ log_info Functions From
          Python Mod.
+       - Fix that minimal-responses does not remove addresses from a priming
+         query response.
 
 21 October 2020: George
        - Fix #327: net/if.h check fails on some darwin versions; contribution by
index be69f628a50743b95d3842b6830073ae457f6702..1746cfbb8fabd4364f1e79e4de70d9be3d1aa8d8 100644 (file)
@@ -624,6 +624,9 @@ positive_answer(struct reply_info* rep, uint16_t qtype) {
 
        for(i=0;i<rep->an_numrrsets; i++) {
                if(ntohs(rep->rrsets[i]->rk.type) == qtype) {
+                       /* for priming queries, type NS, include addresses */
+                       if(qtype == LDNS_RR_TYPE_NS)
+                               return 0;
                        /* in case it is a wildcard with DNSSEC, there will
                         * be NSEC/NSEC3 records in the authority section
                         * that we cannot remove */