From 9bd6f555a458b7a3971290aa0e0af2f87c13a85f Mon Sep 17 00:00:00 2001 From: Ycarus Date: Mon, 23 Apr 2018 10:20:33 +0200 Subject: [PATCH] Fix if ifname not defined --- .../luasrc/controller/openmptcprouter.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 9d96e441c..6eb3ed4e9 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -243,14 +243,14 @@ function interfaces_status() -- Don't show if0 in the overview --if interface == "lo" then return end - local ifname = section['ifname'] + local ifname = section['ifname'] or "" if multipath == "off" and not ifname:match("^tun.*") then return end local asn local connectivity local multipath_state = ut.trim(sys.exec("multipath " .. ifname .. " | grep deactivated")) - if multipath_state == "" then + if multipath_state == "" and ifname ~= "" then connectivity = 'OK' else connectivity = 'ERROR'