From 0c4485a29db604e07ee064026329ef3530ec2d5a Mon Sep 17 00:00:00 2001 From: gitea-action Date: Sat, 21 Dec 2024 16:00:19 +0800 Subject: [PATCH] luci-app-passwall2: sync upstream last commit: https://github.com/xiaorouji/openwrt-passwall2/commit/e7963d6755a6402ed3e854933e811ae6f119c5f6 --- luci-app-passwall2/root/usr/share/passwall2/app.sh | 4 ++-- .../root/usr/share/passwall2/helper_dnsmasq.lua | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/luci-app-passwall2/root/usr/share/passwall2/app.sh b/luci-app-passwall2/root/usr/share/passwall2/app.sh index 3a67fcae4..3d73de5cf 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/app.sh +++ b/luci-app-passwall2/root/usr/share/passwall2/app.sh @@ -794,7 +794,7 @@ run_global() { -DEFAULT_DNS ${AUTO_DNS} -LOCAL_DNS ${LOCAL_DNS:-${AUTO_DNS}} -TUN_DNS ${TUN_DNS} \ -NFTFLAG ${nftflag:-0} \ -NO_LOGIC_LOG ${NO_LOGIC_LOG:-0} - /etc/init.d/dnsmasq restart >/dev/null 2>&1 + lua $APP_PATH/helper_dnsmasq.lua logic_restart -LOG 1 else #Run a copy dnsmasq instance, DNS hijack for that need proxy devices. GLOBAL_DNSMASQ_PORT=$(get_new_port 11400) @@ -1256,7 +1256,7 @@ start() { uci -q commit ${CONFIG} uci -q set dhcp.@dnsmasq[0].dns_redirect='0' uci -q commit dhcp - /etc/init.d/dnsmasq restart >/dev/null 2>&1 + lua $APP_PATH/helper_dnsmasq.lua restart -LOG 0 } fi [ "$ENABLED_DEFAULT_ACL" == 1 ] && run_global diff --git a/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua b/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua index 9e93b68ef..3f74227bb 100644 --- a/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua +++ b/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua @@ -102,10 +102,8 @@ function logic_restart(var) tinsert(dns_table, v) end end - if dns_table and #dns_table > 0 then - uci:set_list("dhcp", "@dnsmasq[0]", "server", dns_table) - uci:commit("dhcp") - end + uci:set_list("dhcp", "@dnsmasq[0]", "server", dns_table) + uci:commit("dhcp") end sys.call("/etc/init.d/dnsmasq restart >/dev/null 2>&1") restore_servers()