Branch Coverage

src/ldns/dnssec_zone.c
Criterion Covered Total %
branch 0 346 0.0


line true false branch
14 0 0 if(!new_rrs) return NULL;
24 0 0 while (rrs) {
26 0 0 if (deep) {
51 0 0 if (!rrs || !rr) {
0 0 if (!rrs || !rr) {
58 0 0 if (cmp < 0) {
59 0 0 if (rrs->next) {
66 0 0 } else if (cmp > 0) {
83 0 0 if (!rrs) {
84 0 0 if ((fmt->flags & LDNS_COMMENT_LAYOUT))
87 0 0 if (rrs->rr) {
90 0 0 if (rrs->next) {
108 0 0 if(!new_rrsets) return NULL;
119 0 0 if (rrsets) {
120 0 0 if (rrsets->rrs) {
123 0 0 if (rrsets->next) {
126 0 0 if (rrsets->signatures) {
148 0 0 if (rrsets) {
159 0 0 if (rrsets) {
175 0 0 if (rr_type == LDNS_RR_TYPE_RRSIG) {
181 0 0 if (!rrsig) {
200 0 0 if (!rrsets || !rr) {
0 0 if (!rrsets || !rr) {
206 0 0 if (rr_type == LDNS_RR_TYPE_RRSIG) {
211 0 0 if (!rrsets->rrs && rrsets->type == 0 && !rrsets->signatures) {
0 0 if (!rrsets->rrs && rrsets->type == 0 && !rrsets->signatures) {
0 0 if (!rrsets->rrs && rrsets->type == 0 && !rrsets->signatures) {
212 0 0 if (!rrsig) {
224 0 0 if (rr_type > ldns_dnssec_rrsets_type(rrsets)) {
225 0 0 if (rrsets->next) {
231 0 0 } else if (rr_type < ldns_dnssec_rrsets_type(rrsets)) {
239 0 0 if (!rrsig) {
252 0 0 if (rrsig) {
253 0 0 if (rrsets->signatures) {
260 0 0 if (rrsets->rrs) {
278 0 0 if (!rrsets) {
279 0 0 if ((fmt->flags & LDNS_COMMENT_LAYOUT))
282 0 0 if (rrsets->rrs &&
0 0 if (rrsets->rrs &&
283 0 0 (show_soa ||
288 0 0 if (rrsets->signatures) {
293 0 0 if (follow && rrsets->next) {
0 0 if (follow && rrsets->next) {
322 0 0 if (!new_name) {
347 0 0 if(ldns_dnssec_name_add_rr(new_name, rr) != LDNS_STATUS_OK) {
359 0 0 if (name) {
360 0 0 if (name->name_alloced) {
363 0 0 if (name->rrsets) {
366 0 0 if (name->nsec && deep) {
0 0 if (name->nsec && deep) {
369 0 0 if (name->nsec_signatures) {
372 0 0 if (name->hashed_name) {
373 0 0 if (deep) {
396 0 0 if (name) {
405 0 0 if (name) {
415 0 0 if (rrset && dname) {
0 0 if (rrset && dname) {
424 0 0 if (rrset && nsec) {
0 0 if (rrset && nsec) {
435 0 0 if (na && nb) {
0 0 if (na && nb) {
438 0 0 } else if (na) {
440 0 0 } else if (nb) {
457 0 0 if (!name || !rr) {
0 0 if (!name || !rr) {
463 0 0 if (rr_type == LDNS_RR_TYPE_RRSIG) {
467 0 0 if (rr_type == LDNS_RR_TYPE_NSEC ||
0 0 if (rr_type == LDNS_RR_TYPE_NSEC ||
471 0 0 } else if (typecovered == LDNS_RR_TYPE_NSEC ||
0 0 } else if (typecovered == LDNS_RR_TYPE_NSEC ||
473 0 0 if (name->nsec_signatures) {
481 0 0 if (name->rrsets) {
497 0 0 while (result) {
498 0 0 if (result->type == type) {
514 0 0 if (!zone || !dname || !zone->names) {
0 0 if (!zone || !dname || !zone->names) {
0 0 if (!zone || !dname || !zone->names) {
519 0 0 if (node) {
532 0 0 if (name) {
533 0 0 if(name->rrsets) {
536 0 0 } else if ((fmt->flags & LDNS_COMMENT_LAYOUT)) {
541 0 0 if(name->nsec) {
544 0 0 if (name->nsec_signatures) {
548 0 0 } else if ((fmt->flags & LDNS_COMMENT_LAYOUT)) {
572 0 0 if(!zone) return NULL;
585 0 0 && ldns_rdf2rr_type(ldns_rr_rrsig_typecovered(rr)) == t;
0 0 && ldns_rdf2rr_type(ldns_rr_rrsig_typecovered(rr)) == t;
646 0 0 if (status != LDNS_STATUS_OK)
649 0 0 if (!newzone || !todo_nsec3s || !todo_nsec3_rrsigs ) {
0 0 if (!newzone || !todo_nsec3s || !todo_nsec3_rrsigs ) {
0 0 if (!newzone || !todo_nsec3s || !todo_nsec3_rrsigs ) {
653 0 0 if (origin) {
654 0 0 if (!(my_origin = ldns_rdf_clone(origin))) {
658 0 0 if (!(my_prev = ldns_rdf_clone(origin))) {
665 0 0 if (ldns_zone_soa(zone)) {
667 0 0 if (status != LDNS_STATUS_OK)
670 0 0 for (i = 0; i < ldns_rr_list_rr_count(ldns_zone_rrs(zone)); i++) {
683 0 0 if (status ==
686 0 0 if (rr_is_rrsig_covering(cur_rr,
696 0 0 } else if (status != LDNS_STATUS_OK)
721 0 0 if (status == LDNS_STATUS_DNSSEC_NSEC3_ORIGINAL_NOT_FOUND) {
722 0 0 if (!(new_node = LDNS_MALLOC(ldns_rbnode_t))) {
728 0 0 if (!ldns_rbtree_insert(&todo_nsec3_ents, new_node)) {
736 0 0 if (todo_nsec3_ents.count > 0)
744 0 0 if (z) {
753 0 0 if (zone) {
762 0 0 if (my_origin) {
765 0 0 if (my_prev) {
768 0 0 if (newzone) {
798 0 0 if (zone) {
799 0 0 if (zone->names) {
813 0 0 if (zone) {
814 0 0 if (zone->names) {
851 0 0 if (zone->hashed_names) {
862 0 0 if (zone->hashed_names == NULL) {
865 0 0 for ( current_node = ldns_rbtree_first(zone->names)
882 0 0 if (! zone->_nsec3params) {
883 0 0 if (! nsec3rr) {
888 0 0 } else if (! nsec3rr) {
894 0 0 if ((new_node = LDNS_MALLOC(ldns_rbnode_t))) {
899 0 0 if (ldns_rbtree_insert(zone->hashed_names, new_node) == NULL) {
912 0 0 if (hashed_name == NULL) {
915 0 0 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_NSEC3 && ! zone->_nsec3params){
0 0 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_NSEC3 && ! zone->_nsec3params){
919 0 0 if (zone->hashed_names == NULL) {
934 0 0 if (!zone || !rr) {
0 0 if (!zone || !rr) {
938 0 0 if (!zone->names) {
940 0 0 if(!zone->names) return LDNS_STATUS_MEM_ERR;
945 0 0 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_RRSIG) {
948 0 0 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_NSEC3 ||
0 0 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_NSEC3 ||
951 0 0 if (!cur_node) {
957 0 0 if (!cur_node) {
960 0 0 if(!cur_name) return LDNS_STATUS_MEM_ERR;
962 0 0 if(!cur_node) {
974 0 0 if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_SOA) {
989 0 0 while (node != LDNS_RBTREE_NULL) {
992 0 0 if ((fmt->flags & LDNS_COMMENT_LAYOUT))
1009 0 0 if (zone) {
1010 0 0 if (zone->soa) {
1011 0 0 if ((fmt->flags & LDNS_COMMENT_LAYOUT)) {
1022 0 0 if ((fmt->flags & LDNS_COMMENT_LAYOUT))
1026 0 0 if (zone->names) {
1054 0 0 if (!zone) {
1057 0 0 if (zone->soa && zone->soa->name) {
0 0 if (zone->soa && zone->soa->name) {
1062 0 0 while (cur_node != LDNS_RBTREE_NULL) {
1066 0 0 while (next_node != LDNS_RBTREE_NULL &&
0 0 while (next_node != LDNS_RBTREE_NULL &&
1067 0 0 next_node->data &&
1073 0 0 if (next_node == LDNS_RBTREE_NULL) {
1076 0 0 if (! cur_node->data || ! next_node->data) {
0 0 if (! cur_node->data || ! next_node->data) {
1091 0 0 for (i = 1; i < next_label_count - soa_label_count; i++) {
1093 0 0 if (lpos >= 0) {
1100 0 0 if (!l1 || ldns_dname_compare(l1, l2) != 0) {
0 0 if (!l1 || ldns_dname_compare(l1, l2) != 0) {
1107 0 0 if (!(ent_name = ldns_dname_clone_from(
1111 0 0 if (nsec3s && zone->_nsec3params) {
0 0 if (nsec3s && zone->_nsec3params) {
1114 0 0 if (!(ent_hashed_name =
1121 0 0 if (!node) {
1128 0 0 if (!new_name) {
1132 0 0 if (!new_name->name) {
1138 0 0 if (!new_node) {
1147 0 0 if (node)
1158 0 0 if (next_node != ldns_rbtree_first(zone->names)) {
1179 0 0 if (ldns_dnssec_name_find_rrset(zone->soa, LDNS_RR_TYPE_NSEC3PARAM)) {
1181 0 0 while (node != LDNS_RBTREE_NULL) {
1183 0 0 if (nsec3 &&ldns_rr_get_type(nsec3)
0 0 if (nsec3 &&ldns_rr_get_type(nsec3)
1184 0 0 == LDNS_RR_TYPE_NSEC3 &&