mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Invalidate 'Wrong Type' snmp_walk() data (#11159)
* Invalidate 'Wrong Type' snmp_walk() data * remove blank line, space before $data
This commit is contained in:
@ -386,7 +386,8 @@ function snmp_walk($device, $oid, $options = null, $mib = null, $mibdir = null)
|
||||
$data = str_replace('"', '', $data);
|
||||
$data = str_replace('End of MIB', '', $data);
|
||||
|
||||
if (is_string($data) && (preg_match('/No Such (Object|Instance)/i', $data))) {
|
||||
if (is_string($data) && (preg_match('/No Such (Object|Instance)/i', $data) || preg_match('/Wrong Type(.*)should be/', $data))) {
|
||||
d_echo("Invalid snmp_walk() data = " . print_r($data, true));
|
||||
$data = false;
|
||||
} else {
|
||||
if (ends_with($data, '(It is past the end of the MIB tree)')) {
|
||||
|
Reference in New Issue
Block a user