Fix version comparison for RouterOS (#15227)

Switched to the suggested version_compare function
This commit is contained in:
Knut Petter Ølberg
2023-08-18 22:51:16 +02:00
committed by GitHub
parent 7e910d60af
commit a3fbed30bb

View File

@@ -85,7 +85,7 @@ if (isset($device['os_group']) && $device['os_group'] == 'cisco') {
echo PHP_EOL;
}//end if
if (($device['os'] == 'routeros') && ($device['version'] <= '7.6')) {
if (($device['os'] == 'routeros') && version_compare($device['version'], '7.7', '<')) {
echo ' LLDP-MIB: ';
$lldp_array = snmpwalk_group($device, 'lldpRemEntry', 'LLDP-MIB', 3);
if (! empty($lldp_array)) {