dnsproxy: "selecting upstream: no upstream specified" on private PTR queries over TCP
Prerequisites
-
[x] I have checked the Wiki and Discussions and found no answer
-
[x] I have searched other issues and found no duplicates
-
[x] I want to report a bug and not ask a question or ask for help
-
[x] I have set up AdGuard Home correctly and configured clients to use it. (Use the Discussions for help with installing and configuring clients.)
Platform (OS and CPU architecture)
FreeBSD, AMD64 (aka x86_64)
Installation
GitHub releases or script from README
Setup
On a router, DHCP is handled by the router
AdGuard Home version
v0.107.80
Action
AdGuard Home is running on OPNsense (FreeBSD/amd64), listening on TCP and UDP port 53.
Configuration:
- Upstream DNS: https://cloudflare-dns.com/dns-query
- use_private_ptr_resolvers: false
- local_ptr_upstreams: []
Run the following command directly on the OPNsense host:
drill -t @127.0.0.1 141.1.168.192.in-addr.arpa PTR
This queries an unknown private IPv4 PTR record over TCP. The issue can be reproduced without NetAlertX or any other external client.
Expected result
AdGuard Home should return NXDOMAIN for an unknown private PTR record when private reverse DNS resolvers are disabled, without logging an upstream-selection error.
Actual result
AdGuard Home returns NXDOMAIN immediately (query time: 0 ms), but simultaneously logs:
[error] dnsproxy: handling request proto=tcp err="selecting upstream: no upstream specified"
The DNS response contains a synthetic SOA record referencing fake-for-negative-caching.adguard.com.
The error is reproducible with the command above.
Additional information and/or screenshots
NetAlertX periodically performs reverse DNS lookups for LAN devices, triggering repeated instances of this error.
Stopping NetAlertX stops the recurring messages, but the error can still be reproduced locally with drill.
Disabling client hostname reverse resolution in AdGuard Home did not resolve the issue.
Normal public DNS resolution and local DNS rewrites continue working.
AdGuard Home was manually updated from v0.107.79 to v0.107.80. The behavior has not yet been tested against v0.107.79, so it is unknown whether this is a regression.
Hello! I can reproduce this. I’ll forward it to the dev team.