diff options
author | Christian Breunig <christian@breunig.cc> | 2023-02-28 22:18:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-28 22:18:04 +0100 |
commit | 851364c00e0521a0afee4b449b0a31de442016f3 (patch) | |
tree | 4113337d39047b0266e8fe26d66cd8dd708c4788 /python/vyos/firewall.py | |
parent | 36cf6ea9a1c86de1352ceef9b0fd8088f1e53a44 (diff) | |
parent | bbfe6b54b58b68768f6427496d8ac3c1ef38da93 (diff) | |
download | vyos-1x-851364c00e0521a0afee4b449b0a31de442016f3.tar.gz vyos-1x-851364c00e0521a0afee4b449b0a31de442016f3.zip |
Merge pull request #1857 from nicolas-fort/nft_queue
T5037: Firewall: Add queue action and options to firewall
Diffstat (limited to 'python/vyos/firewall.py')
-rw-r--r-- | python/vyos/firewall.py | 9 |
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') |