mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Improved device detection
Fixed invalid 0.0.0.0 and 255.255.255.255 scan bug
This commit is contained in:
parent
2df8ac6d7a
commit
93d96d1faa
5 changed files with 46 additions and 16 deletions
|
|
@ -9,13 +9,15 @@ package.path = dirs.installdir .. "/scripts/lua/modules/?/init.lua;" .. package.
|
|||
require "lua_trace"
|
||||
locales_utils = require "locales_utils"
|
||||
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function string.contains(String,Start)
|
||||
if type(String) ~= 'string' or type(Start) ~= 'string' then
|
||||
return false
|
||||
end
|
||||
local i,j = string.find(String,Start,1)
|
||||
|
||||
local i,j = string.find(String, Start, 1)
|
||||
|
||||
return(i ~= nil)
|
||||
end
|
||||
|
|
@ -30,7 +32,7 @@ function shortenString(name, max_len)
|
|||
max_len = tonumber(max_len)
|
||||
if(max_len == nil) then max_len = 24 end
|
||||
end
|
||||
|
||||
|
||||
if(string.len(name) < max_len) then
|
||||
return(name)
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue