[Dnsmasq-discuss] [PATCH] Support for reading the ISC dhcp lease file
Simon Kelley
simon at thekelleys.org.uk
Wed Jul 30 22:24:54 BST 2014
On 30/07/14 11:51, Michael Tremer wrote:
> Hello fellow dnsmasq users,
>
> I am working on the free firewall distribution called IPFire
> (www.ipfire.org) and inside of that distribution, dnsmasq is used as a
> DNS proxy. For the DHCP services, we use the ISC dhcp daemon.
>
> In the past, dnsmasq supported importing the leases from the ISC dhcpd
> lease file which then was unfortunately removed because the code was
> unmaintainable. I am not fully aware of the reasons.
The reason was very simple. The first versions of dnsmasq were just DNS
forwarders, nothing to do with DHCP. Then the ability to read ISC lease
files was added, which allowed DHCP-allocated addresses to be added to
the DNS. This was a good idea, but a bit of a hack, so instead, long
ago, the DHCP server code was added to dnsmasq, with integration with
the DNS side. Finally, after plenty of warning, the now redundant
ISC-leasefile reading code was removed.
We've seen calls to add this code back before, but the question which
I've never seen answered is why it's necessary to use the ISC server and
not the built-in dnsmasq one. The DHCP code in dnsmasq is now very
mature, and I'm not aware of anything it can't do that the ISC code can,
in the niche where dnsmasq is appropriate.
If I knew of a good reason to favour the ISC dhcpd over the dnsmasq one,
I'd be in a better position to judge if this patch is a good idea.
>
> Our workaround was to stick with a very old version of dnsmasq. Now that
> there are things like DNSSEC and that backporting security fixes it not
> a pleasant thing to do, I took the old code and made it work with the
> current master branch.
>
> I started with the old code from John Volpe and Simon and cleaned it up
> step by step. Some things like parsing the date was unnecessarily
> complicated and I think that the attached patch is much cleaner. It has
> been tested a lot by our community and is working well.
>
> There is also a git branch where you can pull my changes from:
>
> http://git.ipfire.org/?p=people/ms/dnsmasq.git;a=shortlog;h=refs/heads/dhcp-lease
>
> I would really like to see this included in dnsmasq. There are also
> various bugs in the bugtrackers of various distributions like Debian and
> so on.
>
> Maybe we can work out the problems and get this merged.
It looks like a good basis for adding the feature, but let's decide if
it's a good feature to have, first.
Cheers,
Simon.
>
> Best,
> -Michael
>
>
>
>
More information about the Dnsmasq-discuss
mailing list