ifHighSpeed value too large for integer data type

Hi,

I have an issue with a device that is reporting values for ifHighSpeed that can’t be stored in the database.

There’s already some static filtering done in the “librenms/includes/polling/ports.inc.php”:
// work around invalid values for ifHighSpeed (fortigate)
if ($this_port[‘ifHighSpeed’] == 4294901759) {
$this_port[‘ifHighSpeed’] = null;
}

As the datatype of the column ports.ifHighSpeed is int(11) signed, a dynamic filter would solve this issue for other devices that are reporting values out of range:
// work around invalid values for ifHighSpeed
if ($this_port[‘ifHighSpeed’] > 2147483647) {
$this_port[‘ifHighSpeed’] = null;
}

Thanks,
Dario