Allow empty APL records

Allow empty APL records because RFC 3123 (Section 4) says "zero or
more items". This fixes processing of a catalog zone ACL (which is
based on APL records) when the zone contains an empty APL record or
when a zone update arrives which creates an empty APL record.

(cherry picked from commit 35b8af229e)
This commit is contained in:
Aram Sargsyan 2026-03-23 15:15:18 +00:00 committed by Arаm Sаrgsyаn (GitLab job 7101883)
parent 05679bda00
commit dbd86cb6d2

View file

@ -327,7 +327,7 @@ dns_rdata_apl_first(dns_rdata_in_apl_t *apl) {
/*
* If no APL return ISC_R_NOMORE.
*/
if (apl->apl == NULL) {
if (apl->apl == NULL || apl->apl_len == 0) {
return ISC_R_NOMORE;
}