Revert "Merge pull request #160 from laf/issue-159"

This reverts commit 59dfe4eee2, reversing
changes made to e6fa7d433d.

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:
Paul Gear
2014-04-28 20:10:36 +10:00
parent 707e512f5c
commit 45d8325e97
2 changed files with 3 additions and 32 deletions
+1 -17
View File
@@ -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")
{