mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Fix vlan as wan interfaces
This commit is contained in:
parent
c74151d21b
commit
76c2696dcb
3 changed files with 15 additions and 3 deletions
|
|
@ -705,7 +705,7 @@ function system_config:applyChanges()
|
|||
|
||||
if is_rebooting then
|
||||
self:writeSystemFiles()
|
||||
-- tprint("Reboot! (debug mode - reboot is disabled)")
|
||||
--tprint("Reboot! (debug mode - reboot is disabled)")
|
||||
sys_utils.rebootSystem()
|
||||
elseif is_self_restarting then
|
||||
sys_utils.restartSelf()
|
||||
|
|
@ -927,6 +927,14 @@ end
|
|||
|
||||
-- Returns true if the interface is currently up and running
|
||||
local function isInterfaceLinkUp(ifname)
|
||||
|
||||
-- Check if vlan
|
||||
local devnamevlan = string.split(ifname, "%.")
|
||||
if devnamevlan and devnamevlan[1] then
|
||||
ifname = devnamevlan[1]
|
||||
-- vlan = devnamevlan[2]
|
||||
end
|
||||
|
||||
local opstatus = sys_utils.execShellCmd("cat /sys/class/net/" .. ifname .. "/operstate 2>/dev/null")
|
||||
return starts(opstatus, "up")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue