Report L2 capability on PacketFront devices if they have bridge ports
This commit is contained in:
1
Info.pm
1
Info.pm
@@ -1560,6 +1560,7 @@ sub device_type {
|
|||||||
4526 => 'SNMP::Info::Layer2::Netgear',
|
4526 => 'SNMP::Info::Layer2::Netgear',
|
||||||
5624 => 'SNMP::Info::Layer3::Enterasys',
|
5624 => 'SNMP::Info::Layer3::Enterasys',
|
||||||
6486 => 'SNMP::Info::Layer3::AlcatelLucent',
|
6486 => 'SNMP::Info::Layer3::AlcatelLucent',
|
||||||
|
9303 => 'SNMP::Info::Layer3::PacketFront',
|
||||||
11898 => 'SNMP::Info::Layer2::Orinoco',
|
11898 => 'SNMP::Info::Layer2::Orinoco',
|
||||||
14179 => 'SNMP::Info::Layer2::Airespace',
|
14179 => 'SNMP::Info::Layer2::Airespace',
|
||||||
14525 => 'SNMP::Info::Layer2::Trapeze',
|
14525 => 'SNMP::Info::Layer2::Trapeze',
|
||||||
|
|||||||
@@ -108,6 +108,21 @@ sub i_ignore {
|
|||||||
return \%i_ignore;
|
return \%i_ignore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub layers {
|
||||||
|
my $pfront = shift;
|
||||||
|
|
||||||
|
my $layers = $pfront->SUPER::layers();
|
||||||
|
# Some models or softwware versions don't report L2 properly
|
||||||
|
# so add L2 capability to the output if the device has bridge ports.
|
||||||
|
my $bports = $pfront->b_ports();
|
||||||
|
|
||||||
|
if ($bports) {
|
||||||
|
my $l = substr $layers, 6, 1, "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $layers;
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
@@ -210,6 +225,11 @@ Returns reference to hash. Increments value of IID if port is to be ignored.
|
|||||||
|
|
||||||
Ignores loopback
|
Ignores loopback
|
||||||
|
|
||||||
|
=item $pfront->layers()
|
||||||
|
|
||||||
|
L2 capability isn't always reported correctly by the device itself; what the
|
||||||
|
device reports is augmented with L2 capability if the device has bridge ports.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::Layer3
|
=head2 Table Methods imported from SNMP::Info::Layer3
|
||||||
|
|||||||
Reference in New Issue
Block a user