-Explicitly block contemplation of stacking ports in mac discovery
-Prevent Cisco switches from being scanned by community string indexes without a valid index -Prevent scanning ports on a cisco for which there is no entry in cisco membership mib and it would be required git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2498 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
541a2ef524
commit
67edc08178
@ -56,8 +56,8 @@ OID, and have the switch table port value match exactly the format suggested by
|
||||
}
|
||||
}
|
||||
|
||||
#stop contemplating vlan, Nu, and console interfaces
|
||||
if (($namepersnmp =~ /vl/i) or ($namepersnmp =~ /Nu/) or ($namepersnmp =~ /onsole/)) {
|
||||
#stop contemplating vlan, Nu, stacking ports, and console interfaces
|
||||
if (($namepersnmp =~ /vl/i) or ($namepersnmp =~ /Nu/) or ($namepersnmp =~ /onsole/) or ($namepersnmp =~ /Stack/) {
|
||||
return 0;
|
||||
}
|
||||
#broken up for code readablitiy, don't check port channel numbers or CPU
|
||||
@ -309,7 +309,7 @@ sub refresh_switch {
|
||||
my $portname;
|
||||
my $switchport = $namemap->{$portid};
|
||||
foreach $portname (keys %{$self->{switches}->{$switch}}) {
|
||||
unless (namesmatch($portname,$switchport)) { next }
|
||||
unless (namesmatch($portname,$switchport) and defined $iftovlanmap->{$portid}) { next }
|
||||
$vlans_to_check{"".$iftovlanmap->{$portid}} = 1; #cast to string, may not be needed
|
||||
}
|
||||
}
|
||||
@ -319,7 +319,7 @@ sub refresh_switch {
|
||||
|
||||
my $vlan;
|
||||
foreach $vlan (sort keys %vlans_to_check) { #Sort, because if numbers, we want 1 first
|
||||
unless ($vlan eq 'NA' or $vlan eq '1') { #don't subject users to the context pain unless needed
|
||||
unless (not $vlan or $vlan eq 'NA' or $vlan eq '1') { #don't subject users to the context pain unless needed
|
||||
if ($snmpver ne '3') {
|
||||
$session = new SNMP::Session(
|
||||
DestHost => $switch,
|
||||
|
Loading…
Reference in New Issue
Block a user