From 744d1f63f5510d0b236b9c3aea1a205107e3ea86 Mon Sep 17 00:00:00 2001 From: fujr Date: Thu, 19 Dec 2024 19:43:43 +0800 Subject: [PATCH] fix ignore dns by mistake --- luci/luci-app-qmodem/root/usr/share/qmodem/modem_dial.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/luci/luci-app-qmodem/root/usr/share/qmodem/modem_dial.sh b/luci/luci-app-qmodem/root/usr/share/qmodem/modem_dial.sh index f850f40..cc1a9be 100755 --- a/luci/luci-app-qmodem/root/usr/share/qmodem/modem_dial.sh +++ b/luci/luci-app-qmodem/root/usr/share/qmodem/modem_dial.sh @@ -377,13 +377,15 @@ set_if() uci set network.${interface_name}.modem_config="${modem_config}" uci set network.${interface_name}.proto="${proto}" uci set network.${interface_name}.defaultroute='1' - uci set network.${interface_name}.peerdns='0' uci set network.${interface_name}.metric="${metric}" uci del network.${interface_name}.dns if [ -n "$dns_list" ];then + uci set network.${interface_name}.peerdns='0' for dns in $dns_list;do uci add_list network.${interface_name}.dns="${dns}" done + else + uci del network.${interface_name}.peerdns fi local num=$(uci show firewall | grep "name='wan'" | wc -l) local wwan_num=$(uci -q get firewall.@zone[$num].network | grep -w "${interface_name}" | wc -l)