[LEDE-DEV] s/dnsmasq/unbound+odhcpd/

Dan Lüdtke mail at danrl.com
Thu Jan 19 12:34:45 PST 2017


Hi everyone,

i built LEDE without dnsmasq but with odhcp instead. Mainly out of curiosity and to test a recent PR by Eric Luehrsen regarding unbound+odhcp.

Just a couple of questions to help me understand why things are the way they are:


A) In ifaces.lua, it says "Display DNS settings if dnsmasq is available" but instead of DNS, DHCP4+6 and RA come next. Wrong comment or did I miss something?

https://github.com/openwrt/luci/blob/44bf3f0c1640040561306caff39f34ac916b4357/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua#L385

B) test for 'if has_dnsmasq and net:proto() == "static" then' should yield false on my built, since it has not dnsmasq, but i still see the section in luci. However, I pressed the button saying "add dhcp server" or something like this. But that should not influence has_dnsmasq, right?
https://github.com/openwrt/luci/blob/44bf3f0c1640040561306caff39f34ac916b4357/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua#L389

local has_dnsmasq  = fs.access("/etc/config/dhcp") seems to be the line in charge of setting the variable. I propose it is renamed to has_dhcp
https://github.com/openwrt/luci/blob/44bf3f0c1640040561306caff39f34ac916b4357/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua#L13

C) How easy it is to determine if dnsmasq and/or odhcp are installed? I like to make the GUI capable of configuring odhcpd, too. Some functions do work already, but that is due to the fact that ODHCPD reads some of dnsmasq/luci variables fine. Some not (ignored) and some are missing. --> https://github.com/sbyx/odhcpd

I would like to add conditionals to each input field that is dhcp-server specific and only have the non-specific appear unconditionally. Good idea? Bad idea?
I want to avoid creating a luci-app-odhcp, that does not look like good integration to me. Other opinions?


Background for all of this is, that I have some nice hardware (lots of RAM for a router) and would like to replace dnsmasq with unbound+odhcpd to get recursion, validation, dns64 and a minimal dhcp server. It would be nice if user experience via LUCI would be on par in this setup with what we know and love from dnsmasq. I'd like to help in making this possible.


Thanks for your help!

Cheers,

Dan





More information about the Lede-dev mailing list