]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fix #46: Print network errors when secure tracing
authorWillem Toorop <willem@nlnetlabs.nl>
Wed, 13 Jul 2022 21:36:06 +0000 (23:36 +0200)
committerWillem Toorop <willem@nlnetlabs.nl>
Wed, 13 Jul 2022 21:36:06 +0000 (23:36 +0200)
Changelog
drill/dnssec.c

index 601a2ecf284a6327183912c26072b9fc47da797b..23651c50268d3fb46a73d4fc1e59fc48c267ff40 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -11,6 +11,8 @@
        * bugfix #166: Grow buffer when writing chars and fixed size
          strings when converting to presentation format, preventing
          potential assersion errors.
+       * bugfix #46: Print failed to get packet instead of null when
+         secure tracing with drill. Thanks reedjc
 
 1.8.1  2021-12-03
        * bugfix #146: ldns-1.7.1 had soname 3.0, so ldns-1.8.x soname
index d41704925dd1508a313ee8cc5fcfa2280d3e1f32..687cfe55a5729adf3f05c84cae0612b809f7927a 100644 (file)
@@ -180,7 +180,20 @@ ldns_verify_denial(ldns_pkt *pkt, ldns_rdf *name, ldns_rr_type type, ldns_rr_lis
 
        ldns_rr_list *nsecs;
        ldns_status result;
-       
+       const ldns_rr_descriptor *descriptor;
+
+       if (!pkt) {
+               descriptor = ldns_rr_descript(type);
+
+               printf("NETWORk ERROR! Cannot verify denial for: ");
+               ldns_rdf_print(stdout, name);
+               printf(" type ");
+               if (descriptor && descriptor->_name)
+                       printf("%s", descriptor->_name);
+               else
+                       printf("TYPE%u", type);
+               return LDNS_STATUS_CRYPTO_NO_RRSIG;
+       }
        if (verbosity >= 5) {
                printf("VERIFY DENIAL FROM:\n");
                ldns_pkt_print(stdout, pkt);