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 94bb545087)
This commit is contained in:
Matthijs Mekking
2021-07-20 11:12:07 +02:00
parent e43d9f08b9
commit 4fec33fd20

View File

@@ -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);
}
}