mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix if interface not set
This commit is contained in:
parent
19e9542fec
commit
c4ad2f6182
1 changed files with 5 additions and 1 deletions
|
@ -557,7 +557,11 @@ end
|
|||
|
||||
function get_device(interface)
|
||||
local dump = require("luci.util").ubus("network.interface.%s" % interface, "status", {})
|
||||
return dump['l3_device']
|
||||
if dump then
|
||||
return dump['l3_device']
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end
|
||||
|
||||
function get_gateway(interface)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue