Skip to content

Commit 935a999

Browse files
committed
resoled: dnssec - don't refuse to verify answer due to too many unrelated RRs
Let VERIFY_RRS_MAX be about the max number of RRs in an RRSet that we actually try to verify, not about the total number of RRs in the RRSet.
1 parent ac04adb commit 935a999

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/resolve/resolved-dns-dnssec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,6 @@ int dnssec_verify_rrset(
525525
if (md_algorithm < 0)
526526
return md_algorithm;
527527

528-
if (a->n_rrs > VERIFY_RRS_MAX)
529-
return -E2BIG;
530-
531528
r = dnssec_rrsig_expired(rrsig, realtime);
532529
if (r < 0)
533530
return r;
@@ -552,6 +549,9 @@ int dnssec_verify_rrset(
552549
return r;
553550

554551
list[n++] = rr;
552+
553+
if (n > VERIFY_RRS_MAX)
554+
return -E2BIG;
555555
}
556556

557557
if (n <= 0)

0 commit comments

Comments
 (0)