#468 Cisco dotted subinterfaces had incorrect vlan assigned
This commit is contained in:
6
Changes
6
Changes
@@ -1,3 +1,9 @@
|
|||||||
|
Version 3.86 (2022-08-10)
|
||||||
|
|
||||||
|
[BUG FIXES]
|
||||||
|
|
||||||
|
* #468 Cisco dotted subinterfaces had incorrect vlan assigned
|
||||||
|
|
||||||
Version 3.85 (2022-08-02)
|
Version 3.85 (2022-08-02)
|
||||||
|
|
||||||
[NEW FEATURES]
|
[NEW FEATURES]
|
||||||
|
|||||||
@@ -116,6 +116,9 @@ $VERSION = '3.85';
|
|||||||
%SNMP::Info::CiscoVTP::MUNGE,
|
%SNMP::Info::CiscoVTP::MUNGE,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
# the i_vlan in SUPER is just fine; this exists to catch any dotted vlan
|
||||||
|
# subinterfaces not caught by CiscoVTP
|
||||||
sub i_vlan {
|
sub i_vlan {
|
||||||
my $cisco = shift;
|
my $cisco = shift;
|
||||||
my $partial = shift;
|
my $partial = shift;
|
||||||
@@ -126,18 +129,17 @@ sub i_vlan {
|
|||||||
|
|
||||||
foreach my $idx ( keys %$i_descr ) {
|
foreach my $idx ( keys %$i_descr ) {
|
||||||
next unless $i_type->{$idx};
|
next unless $i_type->{$idx};
|
||||||
if ( $i_type->{$idx} eq 'l2vlan'
|
next unless (($i_type->{$idx} eq 'l2vlan' or $i_type->{$idx} eq '135')
|
||||||
|| $i_type->{$idx} eq '135' && !defined $i_vlan->{$idx} )
|
and !defined $i_vlan->{$idx});
|
||||||
{
|
|
||||||
# Not sure where this regex came from, anchored at end?
|
|
||||||
if ( $i_descr->{$idx} =~ /\.(\d+)$/ ) {
|
|
||||||
$i_vlan->{$idx} = $1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# This matches 101 in 'Ethernet0.101-802.1Q vLAN subif'
|
# Not sure where this regex came from, anchored at end?
|
||||||
elsif ( $i_descr->{$idx} =~ /\.(\d+)-/ ) {
|
if ( $i_descr->{$idx} =~ /\.(\d+)$/ ) {
|
||||||
$i_vlan->{$idx} = $1;
|
$i_vlan->{$idx} = $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This matches 101 in 'Ethernet0.101-802.1Q vLAN subif'
|
||||||
|
elsif ( $i_descr->{$idx} =~ /\.(\d+)-/ ) {
|
||||||
|
$i_vlan->{$idx} = $1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $i_vlan;
|
return $i_vlan;
|
||||||
|
|||||||
Reference in New Issue
Block a user