From 3e883e163e92d32fe4ccb3609f954efbd683df40 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Fri, 11 Aug 2023 10:13:12 +0100 Subject: [PATCH] fix use specific class for snmp transport --- lib/App/Netdisco/Transport/SNMP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/App/Netdisco/Transport/SNMP.pm b/lib/App/Netdisco/Transport/SNMP.pm index ad440a24..26499a54 100644 --- a/lib/App/Netdisco/Transport/SNMP.pm +++ b/lib/App/Netdisco/Transport/SNMP.pm @@ -216,7 +216,7 @@ sub _snmp_connect_generic { # if successful, restore the default/user timeouts and return if ($info) { - my $class = $info->device_type; + my $class = ($useclass ? $classes[0] : $info->device_type); return $class->new( %snmp_args, Version => $ver, ($info->offline ? (Cache => $info->cache) : ()),