From 4fec33fd201174b326caef464523a7988116a761 Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Tue, 20 Jul 2021 11:12:07 +0200 Subject: [PATCH] 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. (cherry picked from commit 94bb545087af7b9a7730ed12941dee2f1ace6ae2) --- lib/dns/dst_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/dst_api.c b/lib/dns/dst_api.c index 24c032e51a..62600dda60 100644 --- a/lib/dns/dst_api.c +++ b/lib/dns/dst_api.c @@ -2731,7 +2731,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); } }