Skip to content

Commit

Permalink
luci-app-mosdns: fix IPv6 DNS address format
Browse files Browse the repository at this point in the history
fix #107
  • Loading branch information
sbwml committed Jul 23, 2023
1 parent 1905b25 commit c128eff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion luci-app-mosdns/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 6 additions & 1 deletion luci-app-mosdns/root/usr/share/mosdns/mosdns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down

0 comments on commit c128eff

Please sign in to comment.