summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-03-14 22:22:25 +0200
committerGitHub <noreply@github.com>2023-03-14 22:22:25 +0200
commit7f0eb0b029c927e4b7b0003c934f682be9b36380 (patch)
treeeecad127b99f640b5e2dd512e1ad51ac15d21c10 /python
parentc5ee06af8cb0b4485d08a2cf1d1e338c74b3fd85 (diff)
parent80bdd7f93430769ea5cda32d1925dfcd43df5107 (diff)
downloadvyos-1x-7f0eb0b029c927e4b7b0003c934f682be9b36380.tar.gz
vyos-1x-7f0eb0b029c927e4b7b0003c934f682be9b36380.zip
Merge pull request #1890 from nicolas-fort/T5055
T5055: NAT: extend packet-type to NAT
Diffstat (limited to 'python')
-rw-r--r--python/vyos/nat.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/nat.py b/python/vyos/nat.py
index 8a311045a..53fd7fb33 100644
--- a/python/vyos/nat.py
+++ b/python/vyos/nat.py
@@ -47,6 +47,9 @@ def parse_nat_rule(rule_conf, rule_id, nat_type, ipv6=False):
protocol = '{ tcp, udp }'
output.append(f'meta l4proto {protocol}')
+ if 'packet_type' in rule_conf:
+ output.append(f'pkttype ' + rule_conf['packet_type'])
+
if 'exclude' in rule_conf:
translation_str = 'return'
log_suffix = '-EXCL'