From 8ce1f419dd575283df4dc7c1c9a4fd940e90ef43 Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Tue, 14 May 2024 22:07:55 +0800 Subject: [PATCH] Restore port 53 of dnsmasq after the smartdns is stopped. --- package/openwrt/files/etc/init.d/smartdns | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/openwrt/files/etc/init.d/smartdns b/package/openwrt/files/etc/init.d/smartdns index f9c56638bc..ab0ca4f96e 100644 --- a/package/openwrt/files/etc/init.d/smartdns +++ b/package/openwrt/files/etc/init.d/smartdns @@ -119,8 +119,10 @@ stop_main_dns() uci -q set dhcp.@dnsmasq[0].dns_redirect=1 uci -q delete dhcp.@dnsmasq[0].old_dns_redirect } - uci -q delete dhcp.@dnsmasq[0].port + [ "$dnsmasq_port" = "0" ] && { + uci -q set dhcp.@dnsmasq[0].port="53" uci -q del_list dhcp.lan.dhcp_option="6,$hostip" + } uci commit dhcp [ "$norestart" != "1" ] && /etc/init.d/dnsmasq reload }