Report L2 capability on PacketFront devices if they have bridge ports
This commit is contained in:
@@ -108,6 +108,21 @@ sub 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;
|
||||
__END__
|
||||
|
||||
@@ -210,6 +225,11 @@ Returns reference to hash. Increments value of IID if port is to be ignored.
|
||||
|
||||
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
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::Layer3
|
||||
|
||||
Reference in New Issue
Block a user