From 02a52a4e09f7d24a7b3e6bdb7b010beeb31b5627 Mon Sep 17 00:00:00 2001 From: Ambroise Date: Thu, 21 Dec 2017 16:45:20 +0100 Subject: [PATCH] Some Cisco SB switches work as Layer3 devices + avoid a numbers of model type --- lib/SNMP/Info.pm | 5 +++++ lib/SNMP/Info/Layer2/CiscoSB.pm | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/SNMP/Info.pm b/lib/SNMP/Info.pm index bab96034..26a0f502 100644 --- a/lib/SNMP/Info.pm +++ b/lib/SNMP/Info.pm @@ -1691,6 +1691,11 @@ sub device_type { $objtype = 'SNMP::Info::Layer3::CiscoFWSM' if ( $desc =~ /Cisco Firewall Services Module/i ); + # Cisco Small Business (300 500) series override + # This is for enterprises(1).cisco(9).otherEnterprises(6).ciscosb(1) + $objtype = 'SNMP::Info::Layer2::CiscoSB' + if ( $soid =~ /^\.?1\.3\.6\.1\.4\.1\.9\.6\.1/ ); + # Avaya Secure Router $objtype = 'SNMP::Info::Layer3::Tasman' if ( $desc =~ /^(avaya|nortel)\s+(SR|secure\srouter)\s+\d{4}/i ); diff --git a/lib/SNMP/Info/Layer2/CiscoSB.pm b/lib/SNMP/Info/Layer2/CiscoSB.pm index 47d2dc14..a7fecc39 100644 --- a/lib/SNMP/Info/Layer2/CiscoSB.pm +++ b/lib/SNMP/Info/Layer2/CiscoSB.pm @@ -130,8 +130,9 @@ sub model { foreach my $e ( sort keys %$e_model ) { if (defined $e_model->{$e} and $e_model->{$e} !~ /^\s*$/) { - my $model = "$e_model->{$e} $e_hwver->{$e}"; - return $model; + return $e_model->{$e}; + #my $model = "$e_model->{$e} $e_hwver->{$e}"; + #return $model; } } return $ciscosb->description();