Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#853 - Change dnsmasq domain and local options to lists #5798

Open
openwrt-bot opened this issue Jun 18, 2017 · 2 comments
Open

FS#853 - Change dnsmasq domain and local options to lists #5798

openwrt-bot opened this issue Jun 18, 2017 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Jun 18, 2017

cimbalo:

On LEDE 17.01 'domain' and 'local' options in dnsmasq configuration doesn't correctly support lists values as per dnsmasq capabilities.

====Steps to reproduce====

#/etc/config/dhcp
[...]
config dnsmasq
list domain 'example1.com,192.168.0.0/24'
list domain 'example2.com,192.168.1.0/24'
list local '/example1.com/'
list local '/example2.com/'
[...]

$ uci commit dhcp
$ /etc/init.d/dnsmasq restart

====Actual results====

#/var/etc/dnsmasq.conf.cfg02411c
[...]
domain=example1.com,192.168.0.0/24 example2.com,192.168.1.0/24
local=/example1.com/ /example2.com/
[...]

====Expected results====
#/var/etc/dnsmasq.conf.cfg02411c
[...]
domain=example1.com,192.168.0.0/24
domain=example2.com,192.168.1.0/24
local=/example1.com/
local=/example2.com/
[...]

====Workaround====
Replace append_parm with config_list_foreach [[https://github.com/lede-project/source/blob/master/package/network/services/dnsmasq/files/dnsmasq.init#L816-L817|here]] resolve the issue.
I'm attaching a patch for the 17.01 dnsmasq init script but it will break old uci configuration that use 'option' instead of 'list'.
Do you have any suggestion on how to migrate old configuration and set those parameters as lists in uci web interface?

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jun 23, 2017

jow-:

This patch will break LuCI support if applied as-is, please keep in mind to update LuCI as well if you're going to merge it.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Apr 18, 2021

hmoffatt:

It would be good to be able to override the domain for each interface. This could be done by allowing a 'domain' setting within each dhcp section, which would add a new domain= line to the dnsmasq config.

I think this would be more intuitive than the proposed change above, with the added bonus of not breaking existing configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant