DNS64 synthesizes from A records when the AAAA lookup fails with an error other than NXDOMAIN, but never for a bogus answer #309

Merged
claude merged 1 commit from feature/56-dns64-aaaa-errors into develop 2026-11-05 12:48:58 -05:00
Owner

DNS64 now synthesizes from the A records when the AAAA lookup fails with an error other than NXDOMAIN, as RFC 6147 §5.1.2 says, but never for a bogus answer (§5.5).

RFC 6147 §5.1.2: "A result with RCODE=3 (Name Error) is handled according to normal DNS operation … Any other RCODE is treated as though the RCODE were 0 … and the answer section were empty." §5.1.3: a timeout "is treated as RCODE=2 (Server failure)."

  • RecursiveQueryResolver: the DNS64 branch runs for NoData and for ServFail. A ServFail AAAA with a synthesized A answer becomes NOERROR with the synthesized AAAA, no AD bit, TTL capped as §5.1.7 says when there is no SOA. If the A lookup fails too, the original SERVFAIL is returned.
  • Bogus never synthesizes: the iterative engine's ServFail comes only from upstream errors (SERVFAIL, REFUSED, NOTIMP, FORMERR), no answer (timeout), the query budget, referral depth or CNAME overflow; validation runs afterwards only on Success, NXDOMAIN and NODATA, and a bogus verdict clears DNS64 before this branch. No ServFail is cached. (Verifier traced every source.)
  • Forwarding has no DNS64, so forwarded AAAA queries are unaffected.
  • README DNS64 paragraph states the rule.

Tests (RecursiveQueryResolverDns64Tests): a failed AAAA lookup with A present is synthesized (red on develop); A fails too keeps the AAAA error; NXDOMAIN is returned without synthesis; a bogus AAAA is SERVFAIL. Recursive.Tests 276, Web DNS64 tests 12, the class 5/5 runs; build 0 warnings; csharpier clean. Not covered by a test: a timeout through the real engine (mapped to ServFail at IterativeResolutionEngine.cs no-answer path).

Closes #56

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

DNS64 now synthesizes from the A records when the AAAA lookup fails with an error other than NXDOMAIN, as RFC 6147 §5.1.2 says, but never for a bogus answer (§5.5). RFC 6147 §5.1.2: "A result with RCODE=3 (Name Error) is handled according to normal DNS operation … Any other RCODE is treated as though the RCODE were 0 … and the answer section were empty." §5.1.3: a timeout "is treated as RCODE=2 (Server failure)." - `RecursiveQueryResolver`: the DNS64 branch runs for NoData and for ServFail. A ServFail AAAA with a synthesized A answer becomes NOERROR with the synthesized AAAA, no AD bit, TTL capped as §5.1.7 says when there is no SOA. If the A lookup fails too, the original SERVFAIL is returned. - Bogus never synthesizes: the iterative engine's ServFail comes only from upstream errors (SERVFAIL, REFUSED, NOTIMP, FORMERR), no answer (timeout), the query budget, referral depth or CNAME overflow; validation runs afterwards only on Success, NXDOMAIN and NODATA, and a bogus verdict clears DNS64 before this branch. No ServFail is cached. (Verifier traced every source.) - Forwarding has no DNS64, so forwarded AAAA queries are unaffected. - README DNS64 paragraph states the rule. Tests (`RecursiveQueryResolverDns64Tests`): a failed AAAA lookup with A present is synthesized (red on develop); A fails too keeps the AAAA error; NXDOMAIN is returned without synthesis; a bogus AAAA is SERVFAIL. Recursive.Tests 276, Web DNS64 tests 12, the class 5/5 runs; build 0 warnings; csharpier clean. Not covered by a test: a timeout through the real engine (mapped to ServFail at `IterativeResolutionEngine.cs` no-answer path). Closes #56 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
DNS64 synthesizes from A records when the AAAA lookup fails with an error other than NXDOMAIN, but never for a bogus answer
Some checks failed
Build / Pack and Push NuGet Packages (dhcp) (push) Successful in 2m10s
Build / Test .NET (pull_request) Successful in 17m21s
Build / Pack and Push NuGet Packages (dns-core) (push) Successful in 4m5s
Build / Build Binary (linux-amd64) (push) Successful in -2s
Build / Stage Draft Release (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (common) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Has been skipped
Build / Build Binary (linux-amd64) (pull_request) Has been skipped
Build / Build Binary (linux-arm64) (pull_request) Has been skipped
Build / Build Binary (macos-amd64) (pull_request) Has been skipped
Build / Build Binary (macos-arm64) (pull_request) Has been skipped
Build / Build Binary (windows-amd64) (pull_request) Has been skipped
Build / Smoke Test the Windows Binary (pull_request) Has been skipped
Build / Build Arch Linux Packages (pull_request) Has been skipped
Build / Build and Push Image (pull_request) Has been skipped
Build / Build and Test Deb and RPM Packages (pull_request) Has been skipped
Build / Publish Release (pull_request) Has been skipped
Build / Pipeline (pull_request) Failing after 0s
Build / Build Binary (linux-arm64) (push) Successful in 34s
Build / Build Binary (macos-arm64) (push) Successful in 5s
Build / Build Binary (macos-amd64) (push) Successful in 4m31s
Build / Build Binary (windows-amd64) (push) Successful in 3m32s
Build / Smoke Test the Windows Binary (push) Successful in 16s
Build / Build Arch Linux Packages (push) Successful in -2m4s
Build / Build and Test Deb and RPM Packages (push) Successful in -37s
Build / Build and Push Image (push) Successful in -2m9s
Build / Publish Release (push) Successful in -2m38s
Build / Pipeline (push) Successful in 0s
6a26cafbf0
Closes #56

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit 607b398644 into develop 2026-11-05 12:48:58 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!309
No description provided.