From 065298afbdd4ce595ae6b59c9052876ced320832 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Thu, 9 Aug 2018 22:02:20 +0200 Subject: [PATCH] Fix MPTCP check --- .../luasrc/controller/openmptcprouter.lua | 8 ++++++-- .../luasrc/view/openmptcprouter/wanstatus.htm | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 0d97b273f..daa40e225 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -673,10 +673,14 @@ function interfaces_status() if multipath_available_state ~= "" then multipath_available = 'OK' else - multipath_available_state_wan = ut.trim(sys.exec("omr-mptcp-intf " .. ifname .. " | grep 'Nay, Nay, Nay'")) + if mArray.openmptcprouter["service_addr"] ~= "" then + multipath_available_state_wan = ut.trim(sys.exec("omr-mptcp-intf " .. ifname .. " | grep 'Nay, Nay, Nay'")) + else + multipath_available_state_wan = "none" + end if multipath_available_state_wan == "" then multipath_available = 'OK' - mArray.openmptcprouter["server_mptcp"] = false + mArray.openmptcprouter["server_mptcp"] = "disabled" else multipath_available = 'ERROR' if mArray.openmptcprouter["socks_service"] == true and connectivity == "OK" then diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm index 6f284fee9..cecc330cb 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm @@ -110,7 +110,7 @@ { statusMessage += 'ShadowSocks not working
'; } - if (mArray.openmptcprouter.server_mptcp == false) + if (mArray.openmptcprouter.server_mptcp == "disabled") { statusMessage += 'MPTCP not enabled on the server
'; }