mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Implemented a generic approach for ifHighSpeed values that cannot be … (#11504)
* Implemented a generic approach for ifHighSpeed values that cannot be stored in the database Typo * Added os check
This commit is contained in:
@@ -578,9 +578,11 @@ foreach ($ports as $port) {
|
||||
}
|
||||
}
|
||||
|
||||
// work around invalid values for ifHighSpeed (fortigate)
|
||||
if ($this_port['ifHighSpeed'] == 4294901759) {
|
||||
$this_port['ifHighSpeed'] = null;
|
||||
// ifHighSpeed is signed integer, but should be unsigned (Gauge32 in RFC2233). Workaround for some fortinet devices.
|
||||
if ($device['os'] == 'fortigate' || $device['os'] == 'fortisandbox') {
|
||||
if ($this_port['ifHighSpeed'] > 2147483647) {
|
||||
$this_port['ifHighSpeed'] = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this_port['ifHighSpeed']) && is_numeric($this_port['ifHighSpeed'])) {
|
||||
|
||||
Reference in New Issue
Block a user