[Dnsmasq-discuss] Multiple PTR permutation
Simon Kelley
simon at thekelleys.org.uk
Fri Jan 18 12:06:52 GMT 2008
dnsmasq user wrote:
> While recently diagnosing some DNS idiosyncrasies where ptr
> lookups were failing for some and returning what at first
> appeared to be random results for others I came across the
> following.
>
> A dns server for which I have no control over has a somewhat
> large amount of ptr records assigned to a single IP address.
> 262 to be exact. 24.222.108.35
>
> gethostbyaddress doesn't want to work with the large amount of
> data being returned, no fall over to tcp is what I'm assuming,
> hence this being brought to my attention initially as ptr
> lookups on this IP were failing on all the servers, but ptr
> records were being resolved for said IP on all workstations
> on multiple subnets, albeit what appeared to be random results
> per subnet.
>
> After a little bit of head scratching what I discovered was
> the workstations were resolving from dnsmasq while the servers
> were resolving from named servers. Looking into it further
> what I found was dnsmasq was returning only one ptr record
> result and the ptr lookup result would change every time
> dnsmasq was restarted, which explained what appeared to be
> randomness as the individual subnets have their own dnsmasq
> servers to resolve from.
>
> Setting cache-size=0 and restarting dnsmasq allowed the
> lookups on the workstations to return the entire ptr
> lists assigned to that IP.
>
> Discussing this with a colleague it was thought that perhaps
> dnsmasq was never tested against such a large ptr data result
> so I figured I would run it by the list to see if anyone had
> any thoughts on this.
>
> dnsmasq 2.40
>
Indeed, actually two different bugs: firstly dnsmasq ignored all but the
first PTR record. When I fixed that, it got the subset of records from
the truncated UDP response and happily returned just those to the TCP query.
http://www.thekelleys.org.uk/dnsmasq/test-releases/dnsmasq-2.41test30.tar.gz
should fix both of those.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list