From: Matthijs Mekking Date: Tue, 20 Jul 2021 09:12:07 +0000 (+0200) Subject: Fix bug in dst_key_copymetadata X-Git-Tag: v9.17.18~43^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94bb545087af7b9a7730ed12941dee2f1ace6ae2;p=thirdparty%2Fbind9.git Fix bug in dst_key_copymetadata 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. --- diff --git a/lib/dns/dst_api.c b/lib/dns/dst_api.c index a510934d255..b0d5162cc6b 100644 --- a/lib/dns/dst_api.c +++ b/lib/dns/dst_api.c @@ -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); } }