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:
parent
dd224b4d9b
commit
1322a37167
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue