feat(resolver): filter_aaaa for IPv4-only networks #119
Reference in New Issue
Block a user
Delete Branch "feat/filter-aaaa"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #112.
Summary
filter_aaaaflag under[server](defaultfalse). When enabled, AAAA queries short-circuit to NODATA (NOERROR + empty answer) so Happy Eyeballs v2 clients don't stall on a v6 address they can't use (RFC 8305 / RFC 6555).ipv6hintSvcParam (key 6) from HTTPS/SVCB answers per RFC 9460, so Chrome ≥103, Firefox, and Safari don't bypass the AAAA filter via the HTTPS record path. Newsrc/svcb.rsmodule with a minimal RDATA walker — only handles what we need to strip the hint..numaservice proxy, and the blocklist sinkhole all keep their v6 records. The filter only intercepts the cache/forward/recursive path.Why NODATA, not NXDOMAIN
RFC 2308 §2.2: NOERROR + empty answer means "this name exists, but not for this type." Using NXDOMAIN would incorrectly signal "name doesn't exist at all" and break the subsequent A query (RFC 8020).
Prior art
addAction(QTypeRule(DNSQType.AAAA), RCodeAction(DNSRCode.NOERROR))filter-AAAAprivate-address ::/0(different mechanism, same effect)Test plan
cargo test --lib— 313 passedcargo buildcleanipv6hintstripped from cached HTTPS recorddig AAAA example.com @127.0.0.1 -p 5335returns NOERROR/0 answers anddig HTTPS cloudflare.comshows noipv6hint=param