[Dnsmasq-discuss] Name resolution bug.
Wed, 29 Dec 2004 09:54:40 -0700
I believe I have found a bug in the name resolution handling in dnsmasq.
I have two networks connected via a VPN connection. One network is
192.168.0.x and the other is 192.168.1.x. The gateway for each network
is 192.168.[0,1].1 and eth1. eth0 on both computers is connected to the
internet. Both gateway computers have dnsmasq setup and working for
local, and remote addresses, except for one case.
Network 1 - domain name - hxxxxx.etowns.net
Network 2 - domain name - t2hxxxxx.etowns.net
On network two I can successfully resolve the external interface on
hxxxxx.etowns.net, but on network one I cannot resolve
t2hxxxxx.etowns.net, and when I log the requests dnsmasq does not
forward the request to the remote dns servers. My guess is the code that
checks to determine if the requested host is on the local domain checks
the last x number of character to see if they match, but does not check
to see if there are additional characters to the left. In my case both
domains end in hxxxxx.etowns.net, so on domain one any request to
t2hxxxxx.etowns.net is resolved locally which would be incorrect.
I can work around this by setting local=3D/.hxxxxx.etowns.net/ but it
seems like the check should recognize the difference between
myhost1.hxxxxx.etowns.net and myhost1.t2hxxxxx.etowns.net without
requiring the additional . at the front of the local domain name.
If it was designed to work this way, I apologize, and might recommend a
note about local-only domains always starting with a .
P.S. dnsmasq is a great program, and I am extremely happy with it. This
little issue took a while for me to hunt down, but it is much easier
than setting up a full fledged dns server, and a dhcp server. Dnsmasq
gives me all of the features I could possibly need in one easy to
configure program. Thanks much for a great program.