Skip to content

Commit

Permalink
fix: When force adding, use the provided snmp details rather than fro…
Browse files Browse the repository at this point in the history
…m $config (#7004)
  • Loading branch information
laf authored and murrant committed Jul 14, 2017
1 parent 83cb39a commit 9dbb6c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addhost.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}

if ($seclevel === 'nanp') {
array_push($config['snmp']['v3'], $v3);
array_unshift($config['snmp']['v3'], $v3);
}
} elseif ($seclevel === 'anp' or $seclevel === 'authNoPriv') {
$v3['authlevel'] = 'authNoPriv';
Expand All @@ -116,7 +116,7 @@
}
}

array_push($config['snmp']['v3'], $v3);
array_unshift($config['snmp']['v3'], $v3);
} elseif ($seclevel === 'ap' or $seclevel === 'authPriv') {
$v3['authlevel'] = 'authPriv';
$v3args = array_slice($argv, 4);
Expand Down Expand Up @@ -158,7 +158,7 @@
}

if ($community) {
$config['snmp']['community'] = array($community);
array_unshift($config['snmp']['community'], $community);
}
}//end if

Expand Down

0 comments on commit 9dbb6c3

Please sign in to comment.