From 1322a37167ba42196ce410141e2dc5e7c6bdd161 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Sat, 5 Jan 2019 10:10:48 +0100 Subject: [PATCH] Fix get gateway in status page --- .../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 8cc15ed28..80b511b3e 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -579,7 +579,7 @@ function get_gateway(interface) end end if gateway == "" then - if dump and dump.inactive.route then + if dump and dump.inactive and dump.inactive.route then local _, route for _, route in ipairs(dump.inactive.route) do if dump.inactive.route[_].target == "0.0.0.0" then @@ -601,7 +601,7 @@ function get_gateway(interface) end end if gateway == "" then - if dump and dump.inactive.route then + if dump and dump.inactive and dump.inactive.route then local _, route for _, route in ipairs(dump.inactive.route) do if dump.inactive.route[_].target == "0.0.0.0" then