mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-19 04:40:21 +00:00
Task 44651 Filter out unwanted entries from nmap output
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user