[Dnsmasq-discuss] Reg: Info related to leases file

Vladislav Grishenko themiron at mail.ru
Wed Sep 25 22:48:32 BST 2013


> From: Simon Kelley [mailto:simon at thekelleys.org.uk]
> > I understand that leasefile format is preserved due legacy reasons to
> > allow dnsmasq precompiled updates.
> > What if just to add LEASEFILE_LEGACY_FORMAT define to control the subj
> > format?
> > Ppl who able to build it and to control lease format dependent apps
> > would be able to enable/disable it and use on his own, while the rests
> > can continue to use legacy defaults with no harm.
> > No code redundancy would be brought this way, new/old lease-format
> > code would be just not compiled in, anyway don't treat this opinion as
> > a kind of pushing, just consider it's probably good to have it in
upstream.
> 
> The problem is that you're asking for two incompatible things. You want
the
> leasefile format to be a defined interface, which implies, amongst other
> things, that it's stable, and you want to change the leasefile format.
> BTW, as far as I'm concerned, the leasefile format has never been a
defined
> interface, if people are looking in there directly, that's their risk.

Actually not exactly, I see possible leasfile code simplification, and in
the side effect it could be possible to have file format as defined
interface, nothing else.
Ok, if lease format hasn't never been a defined interface, nothing should
prevent from format change at any time, right? So, why not then.

> >
> > Thanks for the remind, both cases require either HAVE_SCRIPT or
> HAVE_DBUS to
> > be enabled, openwrt folks use scripts from the very start.
> > So, dnsmasq code, additional not-dnsmasq file sizes&  required mem
> > increases, complexity grows, possible fault places number too, with the
> same
> > desired result as if leasefile contains new lease info.
> > In my humble opinion, it seems a little bit overkill for embedded world.
> > As an example - a number of recent mails of Tomato firmware folks here
in
> > the list when they decided to update dnsmasq and have accidentally
> dropped
> > homegrown leases-save code, that extends the format of the original one.
> > They have the same reasons - keep dnsmasq&  outter environment as
> small and
> > functional as possible.
> 
> HAVE_SCRIPT isn't very big and this tiny shell script makes a file of
> (IP-address, MAC-address) pairs. It's trivial to alter it to split IPv4
> and IPv6 into different files or include any information from the fields
> exposed by the script interface. The script interface is defined and
> I'll keep it compatible going forward.

Ok, giving up. Script-based has even-driven pros while adding/deleting
lease. My next concern is about lease init stage, when dnsmasq needs to be
restarted due reconfig. Does it need to be implemented, or leasefile in
whatever format could coexist with script?

Best Regards, Vladislav Grishenko





More information about the Dnsmasq-discuss mailing list