[FS#853] Change dnsmasq domain and local options to lists

LEDE Bugs lede-bugs at lists.infradead.org
Sun Jun 18 10:13:16 PDT 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - cimbalo (cimbalo) 

Attached to Project - LEDE Project
Summary - Change dnsmasq domain and local options to lists
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - 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?

One or more files have been attached.

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=853



More information about the lede-bugs mailing list