2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 20:30:56 +00:00

Task 44651 Filter out unwanted entries from nmap output

This commit is contained in:
Casandra Qiu
2015-05-27 12:07:23 -04:00
parent 1c1103c876
commit 41a22e4370

View File

@ -584,10 +584,14 @@ sub nmap_scan {
$ip = $addr->{addr};
}
if ($addr->{vendor}) {
if ( ($addr->{vendor} =~ "Juniper")
|| ($addr->{vendor} =~ "Cisco")
|| ($addr->{vendor} =~ "BNT")
|| ($addr->{vendor} =~ "Mellanox") ) {
$switches->{$ip}->{mac} = $addr->{addr};
$switches->{$ip}->{vendor} = $addr->{vendor};
$switches->{$ip}->{name} = $host->{hostname};
}
}
} #end for each address
}