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:
footstep86
2020-06-12 14:45:00 +02:00
committed by GitHub
parent db38c27986
commit 031c644ab3

View File

@@ -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'])) {