I am trying to understand the behaviour of conf-dir parameter.
Although I am running dnsmasq inside openwrt, this is more a dnsmasq
question than openwrt question.

I have conf-dir=/tmp/dnsmasq.d
This directory CAN contain files or not. The files, when exists,  are
created by  the init scripts of two other services  (nextdns and
stubby)
When nextdns it creates 20-nextdns.conf and send a SIGHUP to dnsmasq (
reload ). The content of the conf file is:

# cat /var/dnsmasq.d/20-nextdns.conf
server=127.0.0.1#5342
strict-order
no-resolv

>From this moment on , the new requests will use nextdns server as
upstream (127.0.0.1 port 5432) as expected.

Now if I start the stubby service, it will create
/var/dnsmasq.d/30-stubby.conf and reload dnsmasq.
# cat /var/dnsmasq.d/30-stubby.conf
server=127.0.0.1#5453
strict-order
no-resolv


Now we have two files inside the conf-dir.


Question number 1: Since we have strict-order, what server should be
used? The one from the 20-nextdns.conf or the one from 30-stubby.conf
?  I suppose the order is  alphabetical, right ?

Now comes the odd part. If I stop nextdns, the init script will delete
the /var/dnsmasq.d/20-nextdns.conf and reload dnsmasq. As expected,
the only upstream server will be the one from 30-stubby.conf  (
127.0.0.1#5453 ). BUT if i start nextdns again, it will create the
/var/dnsmasq.d/20-nextdns.conf again and reload dnsmasq again. But
now, dnsmasq will not start using the dns from 20-nextdns.conf  (
127.0.0.1#5342 ). It will keep using the DNS from 30-stubby.conf (
127.0.0.1#5453).

Question 2: Shouldn't dnsmasq on reload respect the strict-order and
start using the dns from 20-nextdns.conf instead of keeping using the
one from 30-stubby.conf ?

Thanks!






Atenciosamente/Kind regards,
Salatiel

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to