Fix dns_zone_getkasp() function

For inline-signing zones, sometimes kasp was not detected because
the function was called on the raw (unsigned) version of the zone,
but the kasp is only set on the secure (signed) version of the zone.

Fix the dns_zone_getkasp() function to check whether the zone
structure is inline_raw(), and if so, use the kasp from the
secure version.

(cherry picked from commit 681e2ae4b5cd09ea3fd7b36eb93e0d86f40521be)
This commit is contained in:
Matthijs Mekking
2022-11-02 12:21:01 +01:00
parent a092cb3d48
commit ee2970c861
+4
View File
@@ -5921,6 +5921,10 @@ dns_kasp_t *
dns_zone_getkasp(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
if (inline_raw(zone) && zone->secure != NULL) {
return (zone->secure->kasp);
}
return (zone->kasp);
}