summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/conf_mode/nat.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/conf_mode/nat.py b/src/conf_mode/nat.py
index eb634fd78..b66cd370a 100755
--- a/src/conf_mode/nat.py
+++ b/src/conf_mode/nat.py
@@ -238,8 +238,11 @@ def verify(nat):
if rule['translation_address']:
addr = rule['translation_address']
- if addr != 'masquerade' and not is_addr_assigned(addr):
- print(f'Warning: IP address {addr} does not exist on the system!')
+ if addr != 'masquerade':
+ for ip in addr.split('-'):
+ if not is_addr_assigned(ip):
+ print(f'Warning: IP address {ip} does not exist on the system!')
+
elif not rule['exclude']:
raise ConfigError(f'{err_msg} translation address not specified')