netflow: netflow aggregator, skip illegal flow records. https://forum.opnsense.org/index.php?topic=13711

This commit is contained in:
Ad Schellevis 2019-08-17 19:09:11 +02:00
parent 6ddff9e021
commit d8ef93932b

View File

@ -138,6 +138,9 @@ class FlowParser:
raw_data=flowh.read(header[1] * 4),
data_fields=ntohl(header[3])
)
if 'recv_time' not in record or 'agent_info' not in record:
# XXX invalid (empty?) flow record.
continue
record['recv_sec'] = record['recv_time'][0]
if self._recv_stamp is not None and record['recv_sec'] < self._recv_stamp:
# self._recv_stamp can contain the last received timestamp, in which case