summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2023-02-27 20:11:35 +0000
committerNicolas Fort <nicolasfort1988@gmail.com>2023-02-28 14:19:52 +0000
commitbbfe6b54b58b68768f6427496d8ac3c1ef38da93 (patch)
tree201953efa1b8bcb4978d33342788eebb1c08a81c /python
parent4621cfc37a6088059d11c5adf2f33224e3435332 (diff)
downloadvyos-1x-bbfe6b54b58b68768f6427496d8ac3c1ef38da93.tar.gz
vyos-1x-bbfe6b54b58b68768f6427496d8ac3c1ef38da93.zip
T5037: Firewall: Add queue action and options to firewall
Diffstat (limited to 'python')
-rw-r--r--python/vyos/firewall.py9
1 files changed, 9 insertions, 0 deletions
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')