[Dnsmasq-discuss] Execute external commands on DHCP lease allocation / deallocation

Fabio Muzzi liste at kurgan.org
Tue Apr 25 09:17:39 BST 2006


Simon,

I am testing the patched version, and it seems to work.

Here are some suggestions for improvement:


Important:  "del" events happen only when some other dhcp event triggers a
pruning of the lease file. This means that when the last client leaves the
network  its lease will expire, but no "del" event will be triggered until
a  new  client  connects  and  asks for a lease. This should be corrected,
since I rely on "del" events to "logically logoff" clients that switch off
without logging off from the captive portal web page (that is, 100% of the
clients). Ideally, delete events should happen as soon as a lease expires,
but  a  little  delay  (5  minutes?)  can  be  acceptable  in my set-up. I
understand,  if  I'm  not  wrong, that this could be achieved by compiling
with "have_broken_rtc", but maybe there is a better solution.


Not-so-important:  Maybe  you  should differentiate, if it's not too hard,
between  "add"  events  triggered  by dhcp lease allocations and the "add"
events  triggered by leases file being read at startup. This will allow me
to  distinguish  between  "restart-triggered"  events  and  normal  client
connection  events. It's not necessary to distinguish between "del" events
that happen during normal execution and "del" events that are triggered at
startup, at least for my set-up.




-- 

  Fabio "Kurgan" Muzzi




More information about the Dnsmasq-discuss mailing list