summaryrefslogtreecommitdiff
path: root/src/conf_mode/nat66.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-08-08 20:00:55 +0200
committerGitHub <noreply@github.com>2022-08-08 20:00:55 +0200
commit7ae34b68649ef526c18e662d444465bf18a23939 (patch)
tree282d2a4d2b16ba141470d889127798c2cd67274a /src/conf_mode/nat66.py
parent1b637f78b870f8ecc4971de5baf0a6fda54c40f7 (diff)
parent0863b441f4a95c3d3f678f42f31800e9ec4c924a (diff)
downloadvyos-1x-7ae34b68649ef526c18e662d444465bf18a23939.tar.gz
vyos-1x-7ae34b68649ef526c18e662d444465bf18a23939.zip
Merge pull request #1461 from nicolas-fort/nat66-exclude
nat66: T4598: Add exclude options in nat66
Diffstat (limited to 'src/conf_mode/nat66.py')
-rwxr-xr-xsrc/conf_mode/nat66.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/nat66.py b/src/conf_mode/nat66.py
index 0972151a0..f64102d88 100755
--- a/src/conf_mode/nat66.py
+++ b/src/conf_mode/nat66.py
@@ -125,7 +125,8 @@ def verify(nat):
if addr != 'masquerade' and not is_ipv6(addr):
raise ConfigError(f'IPv6 address {addr} is not a valid address')
else:
- raise ConfigError(f'{err_msg} translation address not specified')
+ if 'exclude' not in config:
+ raise ConfigError(f'{err_msg} translation address not specified')
prefix = dict_search('source.prefix', config)
if prefix != None: