diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-11-19 20:59:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 20:59:29 +0100 |
commit | 2fa43aea9c47968754ff7e870f798dbc8b1ed664 (patch) | |
tree | 7ed9f7e005be6e61f04655b67022207f7cd21424 /python/vyos/nat.py | |
parent | 0cec72de1716e5dcad5074be8c5de03464577364 (diff) | |
parent | ad27ccbe68bd0f926259c18e51d85e40bb72eb7b (diff) | |
download | vyos-1x-2fa43aea9c47968754ff7e870f798dbc8b1ed664.tar.gz vyos-1x-2fa43aea9c47968754ff7e870f798dbc8b1ed664.zip |
Merge pull request #1666 from nicolas-fort/T4830-nat66
T4830: nat66: fix how nat66 rules are written in nftables
Diffstat (limited to 'python/vyos/nat.py')
-rw-r--r-- | python/vyos/nat.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/vyos/nat.py b/python/vyos/nat.py index 3d01829a7..e1dfff541 100644 --- a/python/vyos/nat.py +++ b/python/vyos/nat.py @@ -16,6 +16,8 @@ from vyos.template import is_ip_network from vyos.util import dict_search_args +from vyos.template import bracketize_ipv6 + def parse_nat_rule(rule_conf, rule_id, nat_type, ipv6=False): output = [] @@ -69,6 +71,8 @@ def parse_nat_rule(rule_conf, rule_id, nat_type, ipv6=False): else: translation_output.append('to') if addr: + if ipv6: + addr = bracketize_ipv6(addr) translation_output.append(addr) options = [] |