[Dnsmasq-discuss] dhcp-script, add|del|old ...and maybe load, DNSMASQ_USER_CLASSn, etc.

Simon Kelley simon at thekelleys.org.uk
Thu Aug 21 14:59:55 BST 2008


richardvoigt at gmail.com wrote:
>> A few comments, in no particular order.
>>
>> The dhcp script communicates changes to the lease _database_ not individual
>> DHCP interactions with a host. It's as designed that it doesn't get called
>> when a lease is renewed.
> 
> Huh?  A renewal typically changes the expiration time, hence requiring
> database interaction.  At least in my experience the script is called
> for each renewal (using external database only, no lease file).
> 

Ok, I'm guilty of over-simplification. There's a configuration flag,
--leasefile-ro, which is set when dnsmasq is used with an external
database. It's very badly named, but amongst other things, it changes
this behaviour so that a change in expiration time causes a call to the
lease-change script. This is exactly so that an external database can
track lease time.

Note that this still doesn't mean that the script is called on each
renewal; it's possible, though maybe pointless, to renew a lease for a
shorter time so that the expiration time doesn't change. Also, dnsmasq
can be compiled with the HAVE_BROKEN_RTC option. In this case it tracks
lease length, not expiration time. One of the reasons for this is so
that lease renewal _doesn't_ change the lease database. It saves writes
when  the database is stored in NVRAM.

Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list