Since commit
4739584c2434fda6c4f14b0ef3d38fa055352c0e the status of the
interface is not reported correctly anymore. To fix this issue do not test
if the routing table is presented use instead the "/var/run/iface_state/[iface]"
to get the interface state because the routing table will not get deleted
anymore if the interface is offline.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
PKG_NAME:=luci-app-mwan3
PKG_VERSION:=1.4
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_MAINTAINER:=Aedan Renner <chipdankly@gmail.com>
PKG_LICENSE:=GPLv2
function getInterfaceStatus(ruleNumber, interfaceName)
if ut.trim(sys.exec("uci -p /var/state get mwan3." .. interfaceName .. ".enabled")) == "1" then
- if ut.trim(sys.exec(ip .. "route list table " .. ruleNumber)) ~= "" then
+ local fs = require "nixio.fs"
+ if fs.readfile("/var/run/mwan3/iface_state/%s" % interfaceName) == "online" then
if ut.trim(sys.exec("uci -p /var/state get mwan3." .. interfaceName .. ".track_ip")) ~= "" then
return "online"
else