mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fix getFirstInterfaceId returning different ids
This commit is contained in:
parent
bec67745cf
commit
c69c500dd1
2 changed files with 22 additions and 4 deletions
|
|
@ -102,13 +102,13 @@ end
|
|||
-- ##############################################
|
||||
|
||||
function getFirstInterfaceId()
|
||||
local ifnames = interface.getIfNames()
|
||||
local ifid = interface.getFirstInterfaceId()
|
||||
|
||||
for if_id, if_name in pairs(ifnames) do
|
||||
return tonumber(if_id), if_name
|
||||
if ifid ~= nil then
|
||||
return ifid, getInterfaceName(ifid)
|
||||
end
|
||||
|
||||
return -1, "" -- NOTREACHED
|
||||
return -1, ""
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue