Repository navigation
fix(boxes,minimald): the native box-zone answerer answers a name outside the box zone NXDOMAIN - #3370
Conversation
The native box-zone answerer replied REFUSED to a name outside the box zone. glibc reads REFUSED as a temporary failure. Reply NXDOMAIN and cite the root-owned SOA, whose 15 s minimum bounds the negative cache.
Correct the zone_answer decision table and docs, and drop the NET-141 residual for the native deny-all host-address box from spec 18.
…-box-zone-answerer-answers-a-name-outs
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
|
Approved: 1 finding, none above this repo's threshold at Nothing to do. Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. Section 7.1 says the host answerer forwards nothing and its negatives must be cacheable. An out-of-zone name now gets NXDOMAIN with the root-owned SOA and a 15 s minimum, so that negative is cacheable. In-zone negatives keep the zone SOA. The spec edits remove the issue-3020 residual and match the code. No conditions.
Ruled at 6b0c775 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
There was a problem hiding this comment.
Reviewed at 6b0c775afeff against D3020's plan block. The out-of-zone verdict now answers NXDOMAIN, not authoritative, citing dns_gate::out_of_zone_soa_record(). That matches NET-079 and the relays, so glibc no longer reads it as EAI_AGAIN. reply() takes the authority record explicitly, and its four call sites keep the old behavior for the in-zone negatives (the zone's SOA) and the A answer (none). The new test covers A, AAAA and TXT for three out-of-zone names, and the updated in-zone test asserts the root SOA. The spec drops the #3020 residual and states the native answer in the NET-079 note. Every edited file is in the task's layers.
Defect
Fixes #3356
crates/minimald/src/net/answerer.rscrates/minimald/src/net/dns_gate.rscrates/boxes/src/core/zone_answer.rsdocs/specs/18-spec-box-networking/18-spec-box-networking.mdTask marker
Proof
On a native host, an A query for example.com to the box-zone answerer now gets rcode 3 (NXDOMAIN), not REFUSED. The reply is not authoritative. Its authority section holds one SOA owned by the root, with a 15 s minimum and a 15 s TTL. The tests answerer::tests::out_of_zone_name_is_nxdomain_with_root_soa and unknown_in_zone_name_is_nxdomain pin this.
Notes from the agent: crates/minimald/src/net/dns_gate.rs needed no change. out_of_zone_soa_record is pub(crate), and the answerer tests already reach assert_cites_root_soa through crate::net::dns_gate::tests, as guest_dns.rs does. reply() now takes the authority SOA as an argument. In-zone negatives pass the zone SOA, and an A answer passes none. The out-of-zone debug log field changed from answer="refused" to answer="nxdomain-out-of-zone". The Verdict::Refused variant keeps its name, because crates/minvmd/src/net/answerer.rs (outside the layers) matches on it. That VM host daemon answerer still answers an out-of-zone name REFUSED, and the zone_answer docs say so. A follow-up task can change minvmd the same way and rename the variant. Also checked: cargo clippy -p minimald --all-targets (clean), cargo nextest run -p boxes zone_answer (6 passed), cargo fmt --check. just lint-prose did not run, because vale is not installed on this box.
Tests
cargo nextest run -p minimald out_of_zone_name_is_nxdomain_with_root_soacargo nextest run -p minimald unknown_in_zone_name_is_nxdomainVerify
min task run agent-verifytimed out after 1800s, so this PR is a draft.Base
The base branch moved while the coder worked; it was merged in before the tests ran.