- Status Assigned
- Percent Complete
- Task Type Bug Report
- Category Base system
-
Assigned To
Hans Dedecker - Operating System All
- Severity Low
- Priority Very Low
- Reported Version Trunk
- Due in Version Undecided
-
Due Date
Undecided
- Private
FS#853 - Change dnsmasq domain and local options to lists
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 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?
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.