Repository navigation
Conversation
Frando
marked this pull request as ready for review
November 23, 2026 13:10
The lab DNS server only parses queries and writes A, AAAA and TXT answers. `simple-dns` covers this. It is a small crate that only depends on `bitflags`. Names in `simple-dns` compare without ASCII case and ignore the trailing dot, so the store no longer needs `LowerName`. `DnsServer::remove` took a hickory `RecordType`. It now takes a new `patchbay::dns_server::RecordType` with `A`, `Aaaa` and `Txt` variants, so the public API no longer exposes a DNS crate type. `set_txt` now checks each value when the record is set. A value longer than 255 bytes returns an error. New unit tests check `handle_query` for case, response flags, NOERROR and NXDOMAIN. A new lab test reads a TXT record over DNS. - `DnsServer::remove` takes `patchbay::dns_server::RecordType` instead of `hickory_proto::rr::RecordType`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The DNS tests used `hickory-resolver` as a real resolver client inside device namespaces. iroh now resolves with `n0-dns-resolver`, so the tests use it too. This removes the last hickory crate from the workspace. A shared `lookup_first_v4` helper replaces `first_a` and the repeated resolver setup. The tests drop the `hickory_` prefix. One test uses `DnsResolver::system_with_fallback()`, the others read only the system configuration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Frando
force-pushed
the
deps/simple-dns
branch
from
November 23, 2026 13:13
936aa13 to
d2de86f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #92.
Problem
The lab DNS server uses
hickory-prototo parse queries and to write A,AAAA and TXT answers. The tests use
hickory-resolveras a client. Bothare large for what we need. iroh now uses
simple-dnsandn0-dns-resolver.Approach
dns_server.rsusessimple-dns. Names insimple-dnscomparewithout ASCII case and ignore the trailing dot. Thus the store keys on
Namedirectly and no longer needsLowerName.DnsServer::removetook a hickoryRecordType. It now takes a newpatchbay::dns_server::RecordType(A,Aaaa,Txt). The publicAPI does not expose a type from the DNS crate.
set_txtchecks each value when you set the record. A value longerthan 255 bytes returns an error.
n0_dns_resolver::DnsResolverin place ofhickory-resolver. A sharedlookup_first_v4helper replaces therepeated resolver setup.
Breaking changes
DnsServer::removetakespatchbay::dns_server::RecordTypeinsteadof
hickory_proto::rr::RecordType.Impact
Cargo.lock.handle_queryfor case, response flags, NOERRORand NXDOMAIN. A new lab test reads a TXT record over DNS.