From ea0d472cac63aa8d1c3f9a8aced30794aeb066c0 Mon Sep 17 00:00:00 2001 From: sbwml Date: Thu, 11 Aug 2022 01:48:56 +0800 Subject: [PATCH] luci-app-mosdns: fix static ip mode cannot read local dns --- luci-app-mosdns/root/usr/share/mosdns/mosdns.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh index 13493b0..bf56c43 100755 --- a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh +++ b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh @@ -12,7 +12,8 @@ logfile_path() ( interface_dns() ( 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]" else ubus call network.interface.wan status | jsonfilter -e "@['inactive']['dns-server'][$1]"