From faa4f0f79302edc03645bf3bc5fcc4438a5e5ab5 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 2 Sep 2020 10:27:06 +0200 Subject: [PATCH] Check on website only if DNS is working --- .../root/usr/libexec/rpcd/openmptcprouter | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter index cf6f7ae29..25b6e20b2 100755 --- a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter +++ b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter @@ -1193,12 +1193,12 @@ function interfaces_status() if connectivity ~= "ERROR" then if ifname ~= nil and ifname:match("^tun.*") and interface:match("^ovpn.*") then publicIP = uci:get("openmptcprouter",interface:sub(5),"publicip") or "" - if ifname ~= nil and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false then + if ifname ~= nil and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then publicIP = ut.trim(sys.exec("omr-ip-intf " .. get_device(interface:sub(5)))) end else publicIP = uci:get("openmptcprouter",interface,"publicip") or "" - if ifname ~= nil and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false then + if ifname ~= nil and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then publicIP = ut.trim(sys.exec("omr-ip-intf " .. ifname)) end end