unbound: manage resolv.conf iff when listening on 127.0.0.1#53

With this patch the unbound init routines manage resolv.conf if and only if
when unbound will listen on 127.0.0.1#53 and dnsmasq is not.

Also logs some cases where config values are overriden with sane defaults.

Fixes (partially) LEDE FS#785
Fixes openwrt/packages#4487

Signed-off-by: Paul Oranje <por@xs4all.nl>
This commit is contained in:
Paul Oranje
2017-06-14 00:19:25 +02:00
parent 2436771252
commit 39322d45b0
3 changed files with 54 additions and 44 deletions
+1 -2
View File
@@ -37,8 +37,7 @@ dnsmasq_local_zone() {
UNBOUND_D_WAN_FQDN=$wan_fqdn
fi
if [ -n "$fwd_domain" -a -n "$fwd_port" -a ! "$fwd_port" -eq 53 ] ; then
if [ -n "$fwd_domain" -a -n "$fwd_port" -a ! "${fwd_port:-53}" -eq 53 ] ; then
# dnsmasq localhost listening ports (possible multiple instances)
UNBOUND_N_FWD_PORTS="$UNBOUND_N_FWD_PORTS $fwd_port"
UNBOUND_TXT_FWD_ZONE="$UNBOUND_TXT_FWD_ZONE $fwd_domain"