]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Properly update 'maxtype'
authorMark Andrews <marka@isc.org>
Tue, 9 Jan 2024 01:09:03 +0000 (12:09 +1100)
committerMark Andrews <marka@isc.org>
Thu, 16 May 2024 01:53:39 +0000 (01:53 +0000)
'maxtype' should be checked to see if it should be updated whenever
a type is added to the type map.

(cherry picked from commit e84615629f52f551c7482036e4a333498fc5f089)

lib/dns/zoneverify.c

index d5c1537428fe4463cedff48c5b984d3814bb3068..b3ff4461b989fa2cef43dfbbce648a5539af0a56 100644 (file)
@@ -959,6 +959,9 @@ verifynode(vctx_t *vctx, const dns_name_t *name, dns_dbnode_t *node,
                {
                        if (rdataset.type == dns_rdatatype_ns) {
                                dns_nsec_setbit(types, rdataset.type, 1);
+                               if (rdataset.type > maxtype) {
+                                       maxtype = rdataset.type;
+                               }
                        }
                        result = check_no_rrsig(vctx, &rdataset, name, node);
                        if (result != ISC_R_SUCCESS) {
@@ -968,6 +971,9 @@ verifynode(vctx_t *vctx, const dns_name_t *name, dns_dbnode_t *node,
                        }
                } else {
                        dns_nsec_setbit(types, rdataset.type, 1);
+                       if (rdataset.type > maxtype) {
+                               maxtype = rdataset.type;
+                       }
                }
                dns_rdataset_disassociate(&rdataset);
                result = dns_rdatasetiter_next(rdsiter);