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) : ()),