From bbfe6b54b58b68768f6427496d8ac3c1ef38da93 Mon Sep 17 00:00:00 2001 From: Nicolas Fort Date: Mon, 27 Feb 2023 20:11:35 +0000 Subject: T5037: Firewall: Add queue action and options to firewall --- python/vyos/firewall.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'python') diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py index b4b9e67bb..149803bf0 100644 --- a/python/vyos/firewall.py +++ b/python/vyos/firewall.py @@ -337,6 +337,15 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name): target = rule_conf['jump_target'] output.append(f'NAME{def_suffix}_{target}') + if 'queue' in rule_conf['action']: + if 'queue' in rule_conf: + target = rule_conf['queue'] + output.append(f'num {target}') + + if 'queue_options' in rule_conf: + queue_opts = ','.join(rule_conf['queue_options']) + output.append(f'{queue_opts}') + else: output.append('return') -- cgit v1.2.3