Skip to content

Commit

Permalink
Filter: livelog, skip illegal log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Jul 22, 2019
1 parent 64858b5 commit f56cc1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/opnsense/scripts/filter/read_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ def fetch_rule_details():
rulep = record['line'].split('filterlog:')[1].strip().split(',')
update_rule(rule, metadata, rulep, fields_general)

if 'version' in rule:
if 'action' not in rule:
# not a filter log line, skip
continue
elif 'version' in rule:
if rule['version'] == '4':
update_rule(rule, metadata, rulep, fields_ipv4)
if 'proto' in rule:
Expand Down

0 comments on commit f56cc1b

Please sign in to comment.