1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix broadcast-dropbox-listener not giving output

The check for output using maxn was changed to use the # operator in
r23147, but the table was not an "array"-style table. Changed it to test
for next(ids) instead, which works.
This commit is contained in:
dmiller
2012-12-17 23:34:35 +00:00
parent 3afb4c9992
commit b3b3fa70e8

View File

@@ -84,6 +84,10 @@ action = function()
-- Check if we've already seen this ID.
if ids[info.host_int] then
-- We can stop now, since we've seen the same ID twice
-- If ever a host sends a broadcast twice in a row, this will
-- artificially stop the listener. I can't think of a workaround
-- for now, so this will have to do.
break
end
ids[info.host_int] = true
@@ -118,7 +122,7 @@ action = function()
sock:close()
-- If no broadcasts received, don't output anything.
if #ids == 0 then
if not next(ids) then
return
end