luci-app-mosdns: fix static ip mode cannot read local dns

This commit is contained in:
sbwml 2022-08-11 01:48:56 +08:00
parent d67faae180
commit ea0d472cac

View File

@ -12,7 +12,8 @@ logfile_path() (
interface_dns() ( interface_dns() (
peerdns=$(uci -q get network.wan.peerdns) peerdns=$(uci -q get network.wan.peerdns)
if [ "$peerdns" -eq 0 ]; then proto=$(uci -q get network.wan.proto)
if [ "$peerdns" -eq 0 ] || [ "$proto" = "static" ]; then
ubus call network.interface.wan status | jsonfilter -e "@['dns-server'][$1]" ubus call network.interface.wan status | jsonfilter -e "@['dns-server'][$1]"
else else
ubus call network.interface.wan status | jsonfilter -e "@['inactive']['dns-server'][$1]" ubus call network.interface.wan status | jsonfilter -e "@['inactive']['dns-server'][$1]"