summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2022-08-05 17:53:13 +0000
committerNicolas Fort <nicolasfort1988@gmail.com>2022-08-05 17:53:13 +0000
commit3a9e7eafe53108c183cf1f9f2b475f1419236956 (patch)
treea76296b4ac65f9a1bb987be41c2856def5bfa983 /src/conf_mode
parent2a10ffa4b5074be27458159fa94d6227d0e5c7f7 (diff)
downloadvyos-1x-3a9e7eafe53108c183cf1f9f2b475f1419236956.tar.gz
vyos-1x-3a9e7eafe53108c183cf1f9f2b475f1419236956.zip
nat66: T4598: Add exclude options in nat66
Diffstat (limited to 'src/conf_mode')
-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: