Repository navigation
Commit 38b1517
committed
test: pin DNSNsec flood is bounded by _MAX_CACHE_RECORDS
The ``new = is_new and not isinstance(record, DNSNsec)`` line in
``_async_add`` only gates the listener-notify return value — the
counter increment, the cache store, and the cap check are all
type-agnostic. A peer can't flood NSec records past the cap today.
But the existing ``new`` flag is exactly the shape a future refactor
might extend to ``_total_records`` ("DNSNsec isn't real data, don't
count it"), which would silently open a bypass. Pin
``_total_records == _MAX_CACHE_RECORDS`` after pushing
``_MAX_CACHE_RECORDS + 100`` unique-name DNSNsec records so any such
regression fails this test loudly.1 parent a2a2d34 commit 38b1517
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
586 | 606 | | |
587 | 607 | | |
588 | 608 | | |
| |||
0 commit comments