Skip to content

Commit f46bd3a

Browse files
authored
Merge pull request #4692 from l0crian1/fw-pre-def-fix
op-mode: T6857: Fix default action for prerouting hook
2 parents 9491257 + 4013ad1 commit f46bd3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/op_mode/firewall.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def output_firewall_name(family, hook, priority, firewall_conf, single_rule_id=N
214214
row.append(rule_details['conditions'])
215215
rows.append(row)
216216

217-
if hook in ['input', 'forward', 'output']:
217+
if hook in ['input', 'forward', 'output', 'prerouting']:
218218
def_action = firewall_conf['default_action'] if 'default_action' in firewall_conf else 'accept'
219219
else:
220220
def_action = firewall_conf['default_action'] if 'default_action' in firewall_conf else 'drop'
@@ -352,7 +352,7 @@ def output_firewall_name_statistics(family, hook, prior, prior_conf, single_rule
352352
rows.append(row)
353353

354354

355-
if hook in ['input', 'forward', 'output']:
355+
if hook in ['input', 'forward', 'output', 'prerouting']:
356356
row = ['default', '']
357357
rule_details = details['default-action']
358358
row.append(rule_details.get('packets', 0))

0 commit comments

Comments
 (0)