You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a dhcp UCI file with multiple dnsmasq sections, if the first section has the noresolv option set, and a following section contains a resolvfile option, running the dnsmasq init script with the restart argument results in the resolvfile being added to both configuration files.
EG, with the config file:
config dnsmasq 'foo'
option noresolv 1
Thanks for looking into this, I've investigated further and found this issue affects me because I'm using an older version of Busybox. It looks like Busybox since version 1.23.0 uses the bash behaviour for local declarations (regardless of whether it was compiled with bash compatibility).
I'll lodge an issue upstream.
For portability, would you consider patching the init script anyway? As well as older versions of Busybox, ash/dash etc are also affected.
philsauce:
Using OpenWrt trunk.
For a dhcp UCI file with multiple dnsmasq sections, if the first section has the noresolv option set, and a following section contains a resolvfile option, running the dnsmasq init script with the restart argument results in the resolvfile being added to both configuration files.
EG, with the config file:
config dnsmasq 'foo'
option noresolv 1
config dnsmasq 'bar'
option resolvfile '/tmp/resolv.bar.conf'
After running:
/etc/init.d/dnsmasq restart
The content of /var/etc/dnsmasq.conf.foo is:
auto-generated config file from /etc/config/dhcp
conf-file=/etc/dnsmasq.conf
no-resolv
bind-dynamic
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.bar.conf
stop-dns-rebind
dhcp-broadcast=tag:needs-broadcast
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
bogus-priv
conf-file=/usr/share/dnsmasq/rfc6761.conf
This doesn't happen if the init script is given the start or reload argument.
The attached patch fixes the issue for me.
The text was updated successfully, but these errors were encountered: