<div dir="ltr">Hi Geert,<div><br></div><div>Thank you for your response. </div><div><br></div><div>I am not sure I fully understand it. Yes, both times the same IP address is passed however test.conf is being overwritten so at any point in time there is at most one entry with this IP address as per the conf files. Yet dnsmasq daemon thinks there is a duplicate. </div><div><br></div><div>As far as I understand this happens because it does not act on entries deletion: </div><div>- removing test.conf produces no messages in logs;</div><div>- emptying it produces "changed file" message in logs however if you re-add even exactly the same entry (with the same id: and same IP) - then dnsmasq says there is a duplicate which is factually wrong - the address is not leased, the address was removed from config, dnsmasq noticed this change, then the address was re-added with exactly same filter, dnsmasq noticed this change and thinks there is a duplicate. </div><div><br></div><div>Am I missing something? </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 17 May 2020 at 08:10, Geert Stappers <<a href="mailto:stappers@stappers.nl">stappers@stappers.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, May 16, 2020 at 05:07:59PM +0100, an0nym wrote:<br>
> Hello,<br>
> <br>
> I hope you are safe and well.<br>
> <br>
> When dnsmasq is configured to monitor hostsdir, I believe there is no<br>
> forgetting logic when you delete and then create or simply overwrite one of<br>
> the files there with different filter and the same allocated IP.<br>
> <br>
> E. g.<br>
> <br>
> # grep -F dhcp-hostsdir /etc/dnsmasq.conf<br>
> dhcp-hostsdir=/etc/dnsmasq.d/hosts.d<br>
> # echo "id:test,192.168.0.156" >/etc/dnsmasq.d/hosts.d/test.conf<br>
<br>
test .156<br>
<br>
<br>
> # systemctl status dnsmasq<br>
> ...<br>
> dnsmasq[21376]: inotify, new or changed file<br>
> /etc/dnsmasq.d/hosts.d/test.conf<br>
> dnsmasq-dhcp[21376]: read /etc/dnsmasq.d/hosts.d/test.conf<br>
> # echo "id:test2,192.168.0.156" >/etc/dnsmasq.d/hosts.d/test.conf<br>
<br>
test2 .156<br>
<br>
<br>
> # systemctl status dnsmasq<br>
> ...<br>
> dnsmasq[21376]: inotify, new or changed file<br>
> /etc/dnsmasq.d/hosts.d/test.conf<br>
> dnsmasq-dhcp[21376]: read /etc/dnsmasq.d/hosts.d/test.conf<br>
> dnsmasq[21376]: duplicate dhcp-host IP address 192.168.0.156 at line 1 of /etc/dnsmasq.d/hosts.d/test.conf<br>
<br>
duplicate of .156<br>
<br>
<br>
> Dnsmasq 2.80. Apologies if this has been fixed in 2.81,<br>
> I did not succeed in compiling from sources to check.<br>
> <br>
> I hope this helps.<br>
<br>
Helpfull is reporting back how helpfull this message was.<br>
<br>
<br>
Groeten<br>
Geert Stappers<br>
-- <br>
Silence is hard to parse<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div>