From a3fbed30bb3390d37bb47b3f147c7691bfc730b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Petter=20=C3=98lberg?= <54437216+knpo@users.noreply.github.com> Date: Fri, 18 Aug 2023 22:51:16 +0200 Subject: [PATCH] Fix version comparison for RouterOS (#15227) Switched to the suggested version_compare function --- includes/discovery/discovery-protocols.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/discovery-protocols.inc.php b/includes/discovery/discovery-protocols.inc.php index e91822bc01..cf562e5204 100644 --- a/includes/discovery/discovery-protocols.inc.php +++ b/includes/discovery/discovery-protocols.inc.php @@ -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)) {