unbound: Parallel dnsmasq bypasses "Localise queries"
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Package Name
unbound
Maintainer
@EricLuehrsen
OpenWrt Version
24.10.1
OpenWrt Target/Subtarget
ath79/generic
Steps to Reproduce
Assuming the router's hostname is router:
- Set up two subnets (i.e.
lanat 192.168.0.1/24 andguestat 192.168.8.0/24) - Enable
dnsmasq"Localise queries" option (in Luci, under Network > DHCP and DNS > Filter) - Confirm "Localise queries" is working with plain dnsmasq:
-
Connect to
lanand rundig router.lan..
Expected output: a single A record pointing to192.168.0.1. -
Connect to
guestand rundig router.lan.
Expected output: a single A record pointing to192.168.8.1.
- Configure unbound in "parallel dnsmasq" configuration.
- Verify "Localise queries" is bypassed:
-
Connect to
lanand rundig router.lan..
Expected output: a single A record pointing to192.168.0.1.
Actual output: two A records, one pointing to192.168.0.1and one pointing to192.168.8.1. -
Connect to
guestand rundig router.lan..
Expected output: a single A record pointing to192.168.8.1.
Actual output: same as above.
Actual Behaviour
Addresses in both subnets are returned, meaning:
- A client application in the either subnet attempting to resolve the IP of the router may attempt (and possibly fail) to connect to the router in the wrong subnet (and it may not try the address in next record if it doesn't explicitly support this fail-over scenario).
- A client connected to the
guestsubnet may learn the IP addresses and hostnames of devices in thelansubnet, and vice-versa.
This is because the forwarding rule is set up such that unbound forwards queries to dnsmasq over the loopback interface, so dnsmasq can't localise them:
This also means that if dnsmasq is configured not to listen on the loopback interface (in Luci, Network > DHCP and DNS > Devices & Ports > Exclude interfaces), unbound can't connect to it at all.
Suggested fixes
a. Allow specifying the address for dnsmasq. This is useful if unbound is serving only one subnet and/or dnsmasq is not listening on the loopback interface.
b. Document unsupported dnsmasq configurations.
Confirmation Checklist
- The package is maintained in this repository.
- I understand that issues related to the base OpenWrt repository or LuCI repository will be closed.
- I am reporting an issue for OpenWrt, not an unsupported fork.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with net/unbound/files/dnsmasq.sh at the forwarding rule around line 367, then reproduce the parallel dnsmasq setup described in the issue on OpenWrt 24.10.1. The work is done when localized answers remain limited to the requesting subnet and configurations that exclude loopback are handled or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100