summaryrefslogtreecommitdiff
path: root/python/vyos/firewall.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-09-17 21:16:40 +0200
committerGitHub <noreply@github.com>2022-09-17 21:16:40 +0200
commitdcf755594d3ce63239af407f71ceae295a12ed75 (patch)
treeba46fd714927010c7f7f4ccc1fae2e8fa11c1a75 /python/vyos/firewall.py
parenta4feb96af9ac45aff41ded1744cf302b5c5a9e7e (diff)
parent99155150df9ceed0be4df46351844451b0683b3b (diff)
downloadvyos-1x-dcf755594d3ce63239af407f71ceae295a12ed75.tar.gz
vyos-1x-dcf755594d3ce63239af407f71ceae295a12ed75.zip
Merge pull request #1546 from nicolas-fort/fwall-jump
T4699: Firewall: Add jump action in firewall ruleset
Diffstat (limited to 'python/vyos/firewall.py')
-rw-r--r--python/vyos/firewall.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py
index b56caef71..f9b7222fd 100644
--- a/python/vyos/firewall.py
+++ b/python/vyos/firewall.py
@@ -326,6 +326,10 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name):
if 'action' in rule_conf:
output.append(nft_action(rule_conf['action']))
+ if 'jump' in rule_conf['action']:
+ target = rule_conf['jump_target']
+ output.append(f'NAME{def_suffix}_{target}')
+
else:
output.append('return')