mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 20:51:30 +00:00
Fix a crash in snmp-interfaces: http://seclists.org/nmap-dev/2015/q4/218
This commit is contained in:
@@ -301,7 +301,12 @@ function process_ips( if_tbl, ip_tbl )
|
|||||||
for _, v in ipairs( ip_tbl ) do
|
for _, v in ipairs( ip_tbl ) do
|
||||||
if ( v.oid:match("^" .. ip_index) ) then
|
if ( v.oid:match("^" .. ip_index) ) then
|
||||||
index = get_value_from_table( ip_tbl, v.oid )
|
index = get_value_from_table( ip_tbl, v.oid )
|
||||||
|
if not index then goto NEXT_PROCESS_IPS end
|
||||||
item = if_tbl[index]
|
item = if_tbl[index]
|
||||||
|
if not item then
|
||||||
|
stdnse.debug1("Unknown interface index %s", index)
|
||||||
|
goto NEXT_PROCESS_IPS
|
||||||
|
end
|
||||||
|
|
||||||
local objid = v.oid:gsub( "^" .. ip_index, ip_addr )
|
local objid = v.oid:gsub( "^" .. ip_index, ip_addr )
|
||||||
local value = get_value_from_table( ip_tbl, objid )
|
local value = get_value_from_table( ip_tbl, objid )
|
||||||
@@ -316,6 +321,7 @@ function process_ips( if_tbl, ip_tbl )
|
|||||||
if value then
|
if value then
|
||||||
item.netmask = value
|
item.netmask = value
|
||||||
end
|
end
|
||||||
|
::NEXT_PROCESS_IPS::
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user