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

Fix get gateway in status page

This commit is contained in:
Ycarus 2019-01-05 10:10:48 +01:00
parent dd224b4d9b
commit 1322a37167

View file

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