From 44da540da2738b4e0b8a53f5b5f465066c256125 Mon Sep 17 00:00:00 2001 From: Colin Gagnaire Date: Fri, 11 Oct 2019 10:23:40 +0200 Subject: [PATCH] handle snmp discovery without desc --- os/linux/local/mode/discoverysnmp.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/os/linux/local/mode/discoverysnmp.pm b/os/linux/local/mode/discoverysnmp.pm index 1d26863e4..b872f8f6a 100644 --- a/os/linux/local/mode/discoverysnmp.pm +++ b/os/linux/local/mode/discoverysnmp.pm @@ -99,6 +99,7 @@ my $lookup_type = [ sub define_type { my ($self, %options) = @_; + return "unknown" unless (defined($options{desc}) && $options{desc} ne ''); foreach (@$lookup_type) { if ($options{desc} =~ /$_->{re}/) { return $_->{type};