From e1f3fb3a446a6649055dcdae40c444b922285e66 Mon Sep 17 00:00:00 2001 From: Jeroen van Ingen Date: Wed, 21 Sep 2011 17:04:48 +0200 Subject: [PATCH] Fix generic device classification bug for devices w/o L1-L3 support Commit 52275e92 made a small change in generic device classification based on sysObjectID for devices that don't report Layer1 - Layer3 capabilities, in order to skip generic assignment if a more specific class had already been determined. However this change contained an error causing generic classification to fail. Nex fix explicitly checks if class isn't more specific than SNMP::Info before attempting to classify based on sysObjectID. --- Info.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Info.pm b/Info.pm index 831ce2a8..c918c460 100644 --- a/Info.pm +++ b/Info.pm @@ -1499,7 +1499,7 @@ sub device_type { if ( $desc =~ /HP\sVC\s/ ); # Generic device classification based upon sysObjectID - if ( defined($id) and !defined $objtype ) { + if ( defined($id) and $objtype eq 'SNMP::Info') { if ( defined $l3sysoidmap{$id} ) { $objtype = $l3sysoidmap{$id}; } elsif ( defined $l2sysoidmap{$id}) {