[#54] Possible bad values returned for lldp_port with some HP gear
This commit is contained in:
@@ -15,7 +15,7 @@ version 3.18
|
|||||||
have overridden layers.
|
have overridden layers.
|
||||||
* [#58] Fix inheritance in L3::FWSM and L3::CiscoASA
|
* [#58] Fix inheritance in L3::FWSM and L3::CiscoASA
|
||||||
* [#71] Don't try to match on a false port description in lldp_if
|
* [#71] Don't try to match on a false port description in lldp_if
|
||||||
* [#54] Posible bad values returned for cdp_id with some HP
|
* [#54] Possible bad values returned for cdp_id and lldp_port with some HP
|
||||||
gear (Joel Leonhardt)
|
gear (Joel Leonhardt)
|
||||||
|
|
||||||
version 3.17 (2014-06-23)
|
version 3.17 (2014-06-23)
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ sub lldp_port {
|
|||||||
my $pdesc = $lldp->lldp_rem_desc($partial) || {};
|
my $pdesc = $lldp->lldp_rem_desc($partial) || {};
|
||||||
my $pid = $lldp->lldp_rem_pid($partial) || {};
|
my $pid = $lldp->lldp_rem_pid($partial) || {};
|
||||||
my $ptype = $lldp->lldp_rem_pid_type($partial) || {};
|
my $ptype = $lldp->lldp_rem_pid_type($partial) || {};
|
||||||
|
my $vendor = $lldp->vendor();
|
||||||
|
|
||||||
my %lldp_port;
|
my %lldp_port;
|
||||||
foreach my $key ( sort keys %$pid ) {
|
foreach my $key ( sort keys %$pid ) {
|
||||||
@@ -194,7 +195,7 @@ sub lldp_port {
|
|||||||
|
|
||||||
# Avaya/Nortel lldpRemPortDesc doesn't match ifDescr, but we can still
|
# Avaya/Nortel lldpRemPortDesc doesn't match ifDescr, but we can still
|
||||||
# figure out slot.port based upon lldpRemPortDesc
|
# figure out slot.port based upon lldpRemPortDesc
|
||||||
if ( $port =~ /^(Unit\s+(\d+)\s+)?Port\s+(\d+)$/ ) {
|
if ( $vendor eq 'avaya' && $port =~ /^(Unit\s+(\d+)\s+)?Port\s+(\d+)$/ ) {
|
||||||
$port = defined $1 ? "$2.$3" : "$3";
|
$port = defined $1 ? "$2.$3" : "$3";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user