mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
Fix for Cisco kit where match prefix is switched off.
This commit is contained in:
+17
-1
@@ -765,12 +765,28 @@ function snmp_cache_portName($device, $array)
|
||||
function snmp_gen_auth (&$device)
|
||||
{
|
||||
global $debug;
|
||||
$vlan = FALSE;
|
||||
|
||||
if (isset($device['snmpcontext']))
|
||||
{
|
||||
if (is_numeric($device['snmpcontext']) && $device['snmpcontext'] > 0 && $device['snmpcontext'] < 4096 )
|
||||
{
|
||||
$vlan = $device['snmpcontext'];
|
||||
}
|
||||
}
|
||||
|
||||
$cmd = "";
|
||||
|
||||
if ($device['snmpver'] === "v3")
|
||||
{
|
||||
$cmd = " -v3 -n \"\" -l " . $device['authlevel'];
|
||||
$cmd = " -v3 -l " . $device['authlevel'];
|
||||
|
||||
if(is_numeric($vlan))
|
||||
{
|
||||
$cmd .= ' -n "vlan-' . $vlan . '"';
|
||||
} else {
|
||||
$cmd .= ' -n ""';
|
||||
}
|
||||
|
||||
if ($device['authlevel'] === "noAuthNoPriv")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user