P2: later
An appendix to the milestone.
P2: for later
-
NamehasDebugbut noDisplay, andfrom_dottedbut noFromStr. DONE. Finding: a stranger writesname.to_string()or"a.test".parse::<Name>()first, as bothhickory-protoanddomainallow (unverified).Debugprints the dotted form with master-file escapes (lines 315 to 342), which is whatDisplayshould print. There is noHash, and with case-insensitiveEqthere cannot be one without folding; the doc does not say so. Change:impl Displaysharing theDebugbody;impl FromStrdelegating tofrom_dotted; one sentence underNameon whyHashis absent. Additive. Door: two-way. Effort: XS. -
Type sizes and copies lack documentation. DONE in the crate's root doc, with a test that holds the sizes; the README copies the paragraph at the move. Finding:
Nameis 256 bytes andCopy.Reader::recordreturns aRecordby value, soacceptcopies aNameonce per record on each of its three passes over the answer section.Answeris 296 bytes andResult<Answer, Reject>300. A caller on a one-page stack wants to know this before it puts aQueryand anAnswerbeside a 514-byte buffer. Change: a sizes paragraph in the README, as milestone 1048 (what an outside maintainer would fix before 0.1.0)'s review did forgenerational_table; no code change. Door: two-way. Effort: XS. -
ErrorandRejectare exhaustive. DONE. Finding: EDNS(0) or AAAA support would add variants toError. Adding#[non_exhaustive]after a release is a breaking change, removing it is not.Rejectis different:domain_name_resolution_contract::reject_codenumbers each variant and wants the compile error a new one causes, and theRejectdoc promises the list in check order. Change:#[non_exhaustive]onErrornow; leaveRejectexhaustive and say in its doc that the list is the contract. Two-way today, one-way at the tag. Door: two-way. Effort: XS. -
The documentation drifts from the code in four places. DONE. Finding: line 6 says Kani checks the name decoder and the fuzz target the rest, while
proofs.rsproves the header codec and TCP reassembly too. Line 622 says a request is at most 17 + 255 bytes, andHEADER_LEN + MAXIMUM_NAME_BYTES + 4is 271. Lines 262 to 263 say nothing appliesis_within(item 4).Record::rdata_off's doc on line 434 says the data "may be compressed against the whole message", which is true of CNAME data only, as line 433 says one sentence earlier. Change: three sentence edits and one number. Door: two-way. Effort: XS. -
Name::from_dottedchecks DNS label syntax, not host-name syntax, and does not say so. DONE. Finding: the crate accepts-a.testanda-.test(probed), and accepts_anywhere. RFC 952 and RFC 1123 host names forbid a leading or trailing hyphen. For a resolver this is right (a DNS name may hold any byte, and_names are real:_acme-challenge), but a stranger expecting host-name validation gets none and learns that only from the BUGS list. Change: one sentence onfrom_dotted: it accepts the DNS label alphabet the crate chose, not RFC 1123 host-name rules. A caller that wants those checks them. Door: two-way. Effort: XS. -
The captured fixtures cannot be re-captured from the tree. DONE (
tests/fixtures/README.md). Finding:tests/replies.rslines 3 to 6 say the three.dnsfixtures came from1.1.1.1with a twenty-line Python stub sending exactly the bytesQuery::requestwrites. The stub is not in the tree. A stranger who wants a fourth fixture, or wants to check the three, has nothing to run. Change: atests/fixtures/README.mdor a header paragraph with the capture command (apython3 -cone-liner over a UDP socket, ordig +noednswith its raw output), and the id each fixture carries. Door: two-way. Effort: XS. -
Callers size the TCP buffer from the UDP maximum. DONE (
MAXIMUM_TCP_MESSAGE_BYTES, ratified, theTcpReply::newsentence, and the test client, whose reply buffer now holds 65,535 bytes plus the prefix). Finding:TcpReply's doc says the buffer bounds the reply and says nothing about how large a TCP reply may be. RFC 7766 allows 65,535 bytes.components/src/socket_test_client.rsline 409 givesTcpReplya2 + MAXIMUM_UDP_MESSAGE_BYTESbuffer, so the TCP retry that the BUGS list promises for a truncated UDP reply can never hold a reply larger than UDP's. The resolver itself uses 2,048 bytes (domain_name_resolver.rsline 84) and is not affected. The test client is nife's to fix, not the crate's; the crate can stop the next caller making the same choice. Change: aMAXIMUM_TCP_MESSAGE_BYTES: usize = 65_535constant beside the UDP one, and one sentence onTcpReply::newsaying a buffer no larger than the UDP maximum defeats the retry. Then a nife follow-up for the test client. Door: two-way (additive). Effort: XS.