dnsmasq: fix handlers for options `filter_rr` and `cache_rr`
authorEric ZHANG <ericzhangjx@outlook.com>
Sun, 2 Mar 2025 07:54:37 +0000 (15:54 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Sun, 9 Mar 2025 16:26:48 +0000 (17:26 +0100)
commitd136c24f7cc9f7b5ac72259ccf9193683f4ced74
treeead415c0280449fdedb3d23f91b508132f078e0c
parent40f1db9cb11d98ef0b5061b8e210e6351935df8a
dnsmasq: fix handlers for options `filter_rr` and `cache_rr`

According to:
- https://github.com/openwrt/luci/blob/master/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js#L700
- https://github.com/openwrt/luci/blob/master/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js#L402

These two options should be of type `MultiValue` but here there're used as single value. This results in dnsmasq crashes when either of these options are set with multiple values, which leads to an invalid space-separated value.

As these options are designed to take multiple values, I think it's better to use list format eg. `list filter_rr 'AAAA'`, instead of `option filter_rr 'AAAA,HTTPS'`.

See: https://forum.openwrt.org/t/selecting-more-than-one-filter-arbitrary-rr-or-cache-arbitrary-rr-in-v24-10-0-crashes-dnsmasq/225801

Tested on 24.10.0

Signed-off-by: Eric ZHANG <ericzhangjx@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18149
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
package/network/services/dnsmasq/files/dnsmasq.init