Queries for names in the hosts files get A, AAAA and PTR answers from them, and bare names are answered in their place in the lookup order #175
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
Reference
lantea-one/ninlil#175
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Why
See #173.
What changes
HostsFileQueryResolver : IDnsQueryResolver(src/dotnet/src/Ninlil.Dns.Server.Core/Resolution/IDnsQueryResolver.cs:16-33) inNinlil.Dns.Server.HostsFiles, answering multi-label names and PTR as #173 defines. Reply shape like a rewrite answer (DnsRewriteEngine.BuildResponse,src/dotnet/src/Ninlil.Dns.Server.Rewrites/DnsRewriteEngine.cs:257-308), withTimeToLiveSecondsfrom the options; NODATA replies carry no SOA because no zone exists (RFC 2308 §2.2 allows it; the negative answer is then not cached). A single-label query name returns NotHandled.HostsFileHostNameSource : ILocalHostNameSource(#136) withOrder = LocalHostNameSourceOrder.HostsFiles, answering a bare name from the table (A/AAAA; NODATA when the name has no address of the asked family). It answers after DHCP-registered names (#137) and before the local domain (#138).Program.csregisters the resolver afterAddNinlilDnsServerAuthoritativeand before forwarding; update the order comment atProgram.cs:496-502and the resolver list inIDnsQueryResolver.cs:7-9. The source is registered as anILocalHostNameSource.Acceptance
TryResolve_ForANameInAHostsFile_ReturnsItsAddressinsrc/dotnet/tests/Ninlil.Dns.Server.HostsFiles.Tests.ExpandDomainreturns the expanded name; a name in no file returns NotHandled; a single-labelnasreturns NotHandled from the resolver.LocalNetworkGuard(#136):nasin a hosts file is answered by the source; with a fake DHCP source (order 100) also holdingnasat another address, the DHCP address wins; with a fake local-domain source (order 300) holdingnas, the hosts address wins.src/dotnet/tests/Ninlil.Web.Tests(shared host, temp file set through the options) shows a block-list entry still blocks a hosts name.dotnet test src/dotnet/tests/Ninlil.Dns.Server.HostsFiles.Tests,dotnet test src/dotnet/tests/Ninlil.Web.Tests.Source
audit-feature-parity.md§2A #15; RFC 1035 §3.5, RFC 3596 §2.5, RFC 2308 §2.2; DEDUPE.md P6.Owner decision 2026-10-31: Q-PN-11; round 2 R2-BARE (hosts files are the second bare-name source).