diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-03-14 22:22:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 22:22:25 +0200 |
commit | 7f0eb0b029c927e4b7b0003c934f682be9b36380 (patch) | |
tree | eecad127b99f640b5e2dd512e1ad51ac15d21c10 /python/vyos | |
parent | c5ee06af8cb0b4485d08a2cf1d1e338c74b3fd85 (diff) | |
parent | 80bdd7f93430769ea5cda32d1925dfcd43df5107 (diff) | |
download | vyos-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/vyos')
-rw-r--r-- | python/vyos/nat.py | 3 |
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' |