Fix spurious "resource limit exceeded" messages.

Replies from upstream with a REFUSED rcode can result in
log messages stating that a resource limit has been exceeded,
which is not the case.

Thanks to Dominik Derigs and the Pi-hole project for
spotting this.
This commit is contained in:
Simon Kelley
2024-02-19 12:22:43 +00:00
parent 3705ec5592
commit 1ed783b8d7
2 changed files with 8 additions and 3 deletions

View File

@@ -937,10 +937,10 @@ static void dnssec_validate(struct frec *forward, struct dns_header *header,
status = dnssec_validate_reply(now, header, plen, daemon->namebuff, daemon->keyname, &forward->class,
!option_bool(OPT_DNSSEC_IGN_NS) && (forward->sentto->flags & SERV_DO_DNSSEC),
NULL, NULL, NULL, &orig->validate_counter);
}
if (STAT_ISEQUAL(status, STAT_ABANDONED))
log_resource = 1;
if (STAT_ISEQUAL(status, STAT_ABANDONED))
log_resource = 1;
}
/* Can't validate, as we're missing key data. Put this
answer aside, whilst we get that. */