mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Revert "Merge pull request #160 from laf/issue-159"
This reverts commit59dfe4eee2, reversing changes made toe6fa7d433d. This commit does not constitute agreement with the claim of copyright violation made by Adam Armstrong at https://github.com/librenms/librenms/commit/59dfe4eee24630649a1b96b82cb55fb29e07a0b0
This commit is contained in:
+1
-17
@@ -765,28 +765,12 @@ 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 -l " . $device['authlevel'];
|
||||
|
||||
if(is_numeric($vlan))
|
||||
{
|
||||
$cmd .= ' -n "vlan-' . $vlan . '"';
|
||||
} else {
|
||||
$cmd .= ' -n ""';
|
||||
}
|
||||
$cmd = " -v3 -n \"\" -l " . $device['authlevel'];
|
||||
|
||||
if ($device['authlevel'] === "noAuthNoPriv")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user