1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix if ifname not defined

This commit is contained in:
Ycarus 2018-04-23 10:20:33 +02:00
parent 1e4d24bdaa
commit 9bd6f555a4

View file

@ -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'