[Dnsmasq-discuss] SIGUSR2 creates lease file, despite use of --leasefile-ro

Simon Kelley simon at thekelleys.org.uk
Wed Jun 27 07:01:44 BST 2012

On 27/06/12 06:13, Tom Metro wrote:
> On a Tomato USB router, which I believe runs Dnsmasq (v2.55) with the
> --leasefile-ro option, which is documented as:
>    Completely suppress use of the lease database file. The file will not
>    be created, read, or written.
> If you run:
> # cat /var/tmp/dhcp/leases
> cat: can't open '/var/tmp/dhcp/leases': No such file or directory
> # killall -SIGUSR2 dnsmasq
> # cat /var/tmp/dhcp/leases
> #
> So the file is empty, but does exist after receiving SIGUSR2 signal. Bug?
> (This came up in the content of this discussion thread:
> http://tomatousb.org/forum/t-512884 )
>   -Tom
 From the thread referenced: "Tomato code kicks dnsmasq to dump leases 
using SIGUSR2, custom code?"

It looks like this is maybe a Tomato patch which doesn't take into 
account the leasefile-ro flag. Certainly in standard dnsmasq, SIGUSR2 
reopens the log file, and I can't see any way it could affect the lease 

Can we check on exactly which code we're looking at?



More information about the Dnsmasq-discuss mailing list