The serial number is initialised when dnsmasq starts up to the current
time (seconds since 1st Jan 1970). This should ensure that it always
increases when dnsmasq is restarted. The serial number is also increased
by one when /etc/hosts is re-read by sending SIGHUP and when the DHCP
lease database changes. This should ensure it increases whenever the
zone changes without dnsmasq restarting.

If your serial starts a one each time dnsmasq starts up then something
is wrong. Maybe dnsmasq is started before the time is set in your machine?


If you're running on something like a router that doesn't have a battery
backed RTC, dnsmasq may be compiled with HAVE_BROKEN_RTC. In that case
you have to initialise the serial using the --auth-soa option. (dnsmasq
will not start up if you don't). If that's always setting the serial to
one, then that would explain the problem.


Cheers,

Simon.


On 03/08/18 17:26, Wojtek Swiatek wrote:
> 
> 
> Le ven. 3 août 2018 à 17:40, <wkitt...@gmail.com
> <mailto:wkitt...@gmail.com>> a écrit :
> 
> 
>     > systemctl restart dnsmasq
> 
> 
>     this is not a SIGHUP... the following is one correct way... it is
>     chosen for
>     ease and not needing to find the process' PID...
> 
>        pkill -SIGHUP dnsmasq
> 
> 
>     here is another way... slightly more complicated because it does
>     look up the PID...
> 
>        kill -SIGHUP ${pidof dnsmasq}
> 
> 
>     you may need to use sudo if you're doing these manually from the
>     command line...
>     you can use the signal name or number... the following will show you
>     the list of
>     signals, their numbers and a brief description...
> 
>        man 7 signal
> 
> 
> 
> I know that this is not a signal but a restart of the service (I use
> signals on a regular basis in my code as well).
> My understanding is that this is a way to reload the configuration (as
> mentioned by Simon) without stopping the service.
> 
> Do you mean that the right / only way to increase the serial is by
> sending the signal?
> 
> I do not think so as it would make hosts management very awkward (one
> would need not to forget to send the signal) and
> another thread in the past mentioned that the serial is calculated in a
> smart way to always reflect changes.
> 
> Cheers
> Wojtek
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


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

Reply via email to