mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Ensure the checks for ASA context devices are strict (#9441)
This commit is contained in:
@@ -138,7 +138,7 @@ if (!empty($entity_oids)) {
|
||||
$valid_sensor = false;
|
||||
}
|
||||
}
|
||||
if ($current == '-127' || ($device['os'] == 'asa' && str_contains($device['hardware'], 'sc'))) {
|
||||
if ($current == '-127' || ($device['os'] == 'asa' && ends_with($device['hardware'], 'sc'))) {
|
||||
$valid_sensor = false;
|
||||
}
|
||||
// Check for valid sensors
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
if (!str_contains($device['hardware'], 'sc')) {
|
||||
if (!ends_with($device['hardware'], 'sc')) {
|
||||
$oids = 'entPhysicalModelName.1 entPhysicalSoftwareRev.1 entPhysicalSerialNum.1 entPhysicalModelName.4 entPhysicalSoftwareRev.4';
|
||||
|
||||
$data = snmp_get_multi($device, $oids, '-OQUs', 'ENTITY-MIB');
|
||||
|
||||
@@ -683,7 +683,7 @@ foreach ($ports as $port) {
|
||||
}
|
||||
} else {
|
||||
if ($oid == 'ifOperStatus' || $oid == 'ifAdminStatus') {
|
||||
if ($port[$oid . '_prev'] != $this_port[$oid]) {
|
||||
if ($port[$oid.'_prev'] == null) {
|
||||
$port['update'][$oid . '_prev'] = $this_port[$oid];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user