Issue Description
When aardvark-dns receives an AAAA query for a container hostname on an IPv4-only network, it returns NXDOMAIN instead of NOERROR with an empty answer section. This causes DNS clients that query both A and AAAA records (like the host command) to treat the hostname as non-existent, even though the A record resolves correctly.
Per RFC 8020 and general DNS semantics, NXDOMAIN means the name itself does not exist in any form. The correct response when a name exists but has no records of the requested type is NOERROR with an empty answer section (or NODATA).
Docker's embedded DNS server handles this correctly returning NOERROR with no AAAA records, and host succeeds. Aardvark's NXDOMAIN response breaks the same command.
Steps to Reproduce
podman network create --driver bridge testnet
podman run -d --name srv --network testnet alpine sleep infinity
podman run --rm --network testnet alpine sh -c 'apk add --no-cache bind-tools && host srv'
Output:
srv.dns.podman has address 10.89.0.2
Host srv.dns.podman not found: 3(NXDOMAIN)
Host srv.dns.podman not found: 3(NXDOMAIN)
The A record resolves, but the AAAA and MX queries return NXDOMAIN. Since host treats any NXDOMAIN as a failure, the overall exit code is non-zero.
Workaround
Use host -t A srv to restrict the query to A records only.
Expected Behavior
AAAA queries for container hostnames that only have IPv4 addresses should return NOERROR with an empty answer section, not NXDOMAIN. This matches the behavior of Docker's embedded DNS and standard authoritative DNS servers.
Issue Description
When aardvark-dns receives an AAAA query for a container hostname on an IPv4-only network, it returns NXDOMAIN instead of NOERROR with an empty answer section. This causes DNS clients that query both A and AAAA records (like the
hostcommand) to treat the hostname as non-existent, even though the A record resolves correctly.Per RFC 8020 and general DNS semantics, NXDOMAIN means the name itself does not exist in any form. The correct response when a name exists but has no records of the requested type is NOERROR with an empty answer section (or NODATA).
Docker's embedded DNS server handles this correctly returning NOERROR with no AAAA records, and
hostsucceeds. Aardvark's NXDOMAIN response breaks the same command.Steps to Reproduce
podman network create --driver bridge testnet podman run -d --name srv --network testnet alpine sleep infinity podman run --rm --network testnet alpine sh -c 'apk add --no-cache bind-tools && host srv'Output:
The A record resolves, but the AAAA and MX queries return NXDOMAIN. Since
hosttreats any NXDOMAIN as a failure, the overall exit code is non-zero.Workaround
Use
host -t A srvto restrict the query to A records only.Expected Behavior
AAAA queries for container hostnames that only have IPv4 addresses should return NOERROR with an empty answer section, not NXDOMAIN. This matches the behavior of Docker's embedded DNS and standard authoritative DNS servers.