Skip to content

Commit

Permalink
netflow: netflow aggregator, skip illegal flow records. https://forum…
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Aug 17, 2019
1 parent 6ddff9e commit d8ef939
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/opnsense/scripts/netflow/lib/flowparser.py
Expand Up @@ -138,6 +138,9 @@ def __iter__(self):
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
Expand Down

0 comments on commit d8ef939

Please sign in to comment.