On 11/09/15 15:54, Guido Günther wrote:
> On Fri, Sep 11, 2015 at 03:57:19PM +0200, Guido Günther wrote:
>> Package: dnsmasq
>> Version: 2.75-1
>> Severity: normal
>>
>> Hi,
>> I just tried your suggestion with --hostdir=/tmp/test. While I see these
>> log messages nicely:
>>
>> Sep 11 15:53:49 foo dnsmasq[14616]: inotify, new or changed file 
>> /tmp/test/libvirt-qemu%3A%2F%2F%2Fsystem.hosts.tmp
>> Sep 11 15:53:49 foo dnsmasq[14616]: read 
>> /tmp/test/libvirt-qemu%3A%2F%2F%2Fsystem.hosts.tmp - 3 addresses
>> Sep 11 15:53:49 foo dnsmasq[14616]: inotify, new or changed file 
>> /tmp/test/libvirt-qemu%3A%2F%2F%2Fsystem.hosts
>> Sep 11 15:53:49 foo dnsmasq[14616]: read 
>> /tmp/test/libvirt-qemu%3A%2F%2F%2Fsystem.hosts - 3 addresses
>>
>> these addresses are _only_ being served if they are already present in
>> the file during daemon start. New entries are not being served. Note
>> that my program writes to a .tmp first and then does a rename so this
>> might confuse dnsmasq (and I can't use s.th. like:
> 
> Even when I skip the writing to .tmp file step dnsmasq does only server
> entries that are present in the file at startup.
> 
> A SIGHUP also lets the daemon server the entries from the hostdir.
> 
> Cheers,
>  -- Guido
> 

Ok, a trivial attempt to reproduce this fails for me. I create a new
file in the directory with a new name in it and I can immediately look
up the new name. What is in your hosts file? Are the names or addresses
re-used?

I would be interesting to set --log-queries, and to look at the cache
dump created in the log by sending SIGUSR1.


Cheers,

Simon.

Reply via email to