]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fix ldns_dnssec_zone_new_frm_fp_l to allow the last parsed line of a zone to be an...
authorWillem Toorop <willem@NLnetLabs.nl>
Wed, 21 Nov 2012 22:12:52 +0000 (22:12 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Wed, 21 Nov 2012 22:12:52 +0000 (22:12 +0000)
Thanks Peter van Dijk

Changelog
dnssec_zone.c

index b1582497d9346a38b9b2192248bc5f60502ed862..5b3246e0a9a1a780a34ff9ac82c27e80638650f4 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,6 @@
 1.6.17
+       * Fix ldns_dnssec_zone_new_frm_fp_l to allow NSEC3 (or its RRSIG)
+         covering an empty non terminal as the last line. 
 
 1.6.16 2012-11-13
        * Fix Makefile to build pyldns with BSD make
index df71a23c7edeed176ed3e1087c29d79242961b09..ece11e6ac3a7c45050eba341117d492c1e44e0ae 100644 (file)
@@ -699,6 +699,8 @@ ldns_dnssec_zone_new_frm_fp_l(ldns_dnssec_zone** z, FILE* fp, ldns_rdf* origin,
                                        ldns_rr_list_push_rr(todo_nsec3s,
                                                        cur_rr);
                                }
+                               status = LDNS_STATUS_OK;
+
                        } else if (status != LDNS_STATUS_OK)
                                goto error;
 
@@ -722,18 +724,13 @@ ldns_dnssec_zone_new_frm_fp_l(ldns_dnssec_zone** z, FILE* fp, ldns_rdf* origin,
 
        if (ldns_rr_list_rr_count(todo_nsec3s) > 0) {
                (void) ldns_dnssec_zone_add_empty_nonterminals(newzone);
-               for (i = 0; status == LDNS_STATUS_OK && 
+               for (i = 0; status == LDNS_STATUS_OK &&
                                i < ldns_rr_list_rr_count(todo_nsec3s); i++) {
                        cur_rr = ldns_rr_list_rr(todo_nsec3s, i);
                        status = ldns_dnssec_zone_add_rr(newzone, cur_rr);
                }
-               for (i = 0; status == LDNS_STATUS_OK &&
-                               i < ldns_rr_list_rr_count(todo_nsec3_rrsigs);
-                               i++){
-                       cur_rr = ldns_rr_list_rr(todo_nsec3_rrsigs, i);
-                       status = ldns_dnssec_zone_add_rr(newzone, cur_rr);
-               }
-       } else if (ldns_rr_list_rr_count(todo_nsec3_rrsigs) > 0) {
+       } 
+       if (ldns_rr_list_rr_count(todo_nsec3_rrsigs) > 0) {
                for (i = 0; status == LDNS_STATUS_OK &&
                                i < ldns_rr_list_rr_count(todo_nsec3_rrsigs);
                                i++){