luci: auto disable dns redirect for some firmware

This commit is contained in:
Nick Peng
2022-09-01 20:00:31 +08:00
parent d8c53a6215
commit 822f02bab9
2 changed files with 5 additions and 1 deletions

View File

@@ -96,6 +96,10 @@ set_main_dns()
uci -q set dhcp.@dnsmasq[0].port=0
uci -q set dhcp.lan.dhcp_option="6,$hostip"
# for some third-party firmware
redir_dns="$(uci -q get dhcp.@dnsmasq[0].dns_redirect)"
[ "$redir_dns" = "1" ] && uci -q set dhcp.@dnsmasq[0].dns_redirect=0
uci commit dhcp
/etc/init.d/dnsmasq restart
}