[Dnsmasq-discuss] [BUG] Bogus IP address in the syslog messages

Simon Kelley simon at thekelleys.org.uk
Fri Feb 26 09:26:22 GMT 2010


Sergei Zhirikov wrote:
> On 2010-02-20 17:21, Simon Kelley wrote:
>> Sergei Zhirikov wrote:
>>> 
>>> As I said, there is only one IP address. I have also used tcpdump
>>> to watch both DHCP and DNS communication. The address 216.230.6.8
>>> does not show up anywhere. (As a sidenote: I found it a bit
> I have managed to figure out what is going on. There is, indeed,
> something unusual about my configuration. One line in dnsmasq.conf
> that I erroneously disregarded as irrelevant turned out to be very
> much relevant:
> 
> cname=wafer.local.softlights.net,wafer.softlights.net
> 
> Together with another line:
> 
> domain=local.softlights.net
> 
> and a line in /etc/hosts:
> 
> 172.23.112.1 wafer.softlights.net wafer
> 
> they result in host name wafer.local.softlights.net being resolved to
> the same IP address (172.23.112.1) in two different ways: one -
> directly, the other one - via alias to wafer.softlights.net. So there
> are, indeed, two records for that host name in the dnsmasq cache,
> which are looked up in the round-robin fashion. One record is of type
> A and another one is of type CNAME. It is that CNAME record that
> shows up as the bogus IP address, because the code for logging the
> message assumes that the record is always of type A, so it prints out
> the IP address member of the union, which has been initialized with
> the host name the CNAME record is pointing to. In other words, it is
> a bug in the logging code, but a minor one with no memory corruption
> involved.
> 

Great! Many thanks for that thorough analysis. I think there needs to be
two fixes for this.

1) Forbid a CNAME and an /etc/hosts entry for the same name. That's
really not allowed in DNS-land.

2) log correctly when a DHCP-derived name clashes with a CNAME.

Expect fixes soon.


Cheers,

Simon.




More information about the Dnsmasq-discuss mailing list