diff --git a/luci-app-mosdns/Makefile b/luci-app-mosdns/Makefile index f1d59cc..80de3b7 100644 --- a/luci-app-mosdns/Makefile +++ b/luci-app-mosdns/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-mosdns -PKG_VERSION:=1.5.4 +PKG_VERSION:=1.5.5 PKG_RELEASE:=1 LUCI_TITLE:=LuCI Support for mosdns diff --git a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh index 95f2bc6..2e9f2a7 100755 --- a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh +++ b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh @@ -19,7 +19,12 @@ interface_dns() ( peerdns=$(uci -q get network.wan.peerdns) proto=$(uci -q get network.wan.proto) if [ "$peerdns" = 0 ] || [ "$proto" = "static" ]; then - uci -q get network.wan.dns + ipv6_check=$(uci -q get network.wan.dns) + case "$ipv6_check" in + # ipv6 format + *:*) echo $(uci -q get network.wan.dns) | sed "s/[^ ]*:[^ ]*/'[&]'/g" ;; + *) uci -q get network.wan.dns ;; + esac else interface_status=$(ubus call network.interface.wan status) echo $interface_status | jsonfilter -e "@['dns-server'][0]"