mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix if device not yet exist
This commit is contained in:
parent
c428d8a9ba
commit
3d7002f88c
1 changed files with 5 additions and 1 deletions
|
@ -736,7 +736,11 @@ end
|
|||
|
||||
function get_device(interface)
|
||||
local dump = require("luci.util").ubus("network.interface.%s" % interface, "status", {})
|
||||
return dump['l3_device']
|
||||
if dump ~= nil then
|
||||
return dump['l3_device']
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end
|
||||
|
||||
-- This function come from modules/luci-bbase/luasrc/tools/status.lua from old OpenWrt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue