bind9/lib
Ondřej Surý 3c33e7d937
Implement Fisher-Yates shuffle for nameserver selection
Replace the two-pass "random start index and wrap around" logic in
fctx_getaddresses_nameservers() with a statistically sound Fisher-Yates
shuffle.

The previous implementation picked a random starting node and did two
passes over the linked list to find query candidates.  The new logic
extracts the available nameservers into a bounded, stack-allocated array
of dns_rdata_t structures.

This array is then randomized in-place using a Fisher-Yates shuffle.
Finally, the shuffled array is traversed sequentially to launch fetches
until the dynamic quota (fctx->pending_running >= fetches_allowed) is
reached.

This guarantees a fair random distribution for outbound queries while
properly respecting dynamic query limits, entirely within O(1) memory
and without the overhead of linked-list pointer shuffling or multiple
dataset traversals.
2026-02-26 06:57:53 +01:00
..
dns Implement Fisher-Yates shuffle for nameserver selection 2026-02-26 06:57:53 +01:00
isc Enforce NSEC3 record consistency 2026-02-24 14:57:22 +01:00
isccc switch isc_md_type_t to a proper enum 2026-02-02 11:12:55 +03:00
isccfg Minor logging improvements for key lifetime 2026-02-06 15:06:47 +00:00
ns Clear serve-stale flags when following the CNAME chains 2026-02-23 08:07:12 +01:00
.gitignore The isc/platform.h header has been completely removed 2021-07-06 05:33:48 +00:00
meson.build replace the build system with meson 2025-06-11 10:30:12 +03:00