From 5c6a8f3c456f2e5b5523620cce024995f9a8207c Mon Sep 17 00:00:00 2001 From: Max Baker <> Date: Wed, 28 Jan 2004 06:41:19 +0000 Subject: [PATCH] checked for empty id in model() --- Info/Layer3.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Info/Layer3.pm b/Info/Layer3.pm index 5f816e0a..be22213c 100644 --- a/Info/Layer3.pm +++ b/Info/Layer3.pm @@ -149,6 +149,12 @@ sub serial { sub model { my $l3 = shift; my $id = $l3->id(); + + unless (defined $id){ + print " SNMP::Info::Layer3::model() - Device does not support sysObjectID\n" if $DEBUG; + return undef; + } + my $model = &SNMP::translateObj($id); $model =~ s/^cisco//i;