]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix bug in dst_key_copymetadata
authorMatthijs Mekking <matthijs@isc.org>
Tue, 20 Jul 2021 09:12:07 +0000 (11:12 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 11 Aug 2021 13:15:25 +0000 (15:15 +0200)
When copying metadata from one dst_key to another, when the source
dst_key has a boolean metadata unset, the destination dst_key will
have a numeric metadata unset instead.

This means that if a key has KSK or ZSK unset, we may be clearing the
Predecessor or Successor metadata in the destination dst_key.

lib/dns/dst_api.c

index a510934d2558d878ab8bcaaac6cf8b085f388ebd..b0d5162cc6b243302d0b857cb7305e99c7f08e2b 100644 (file)
@@ -2708,7 +2708,7 @@ dst_key_copy_metadata(dst_key_t *to, dst_key_t *from) {
                if (result == ISC_R_SUCCESS) {
                        dst_key_setbool(to, i, yesno);
                } else {
-                       dst_key_unsetnum(to, i);
+                       dst_key_unsetbool(to, i);
                }
        }