diff options
author | Marcus Hoff <marcus.hoff@ring2.dk> | 2020-10-03 13:46:22 +0200 |
---|---|---|
committer | Marcus Hoff <marcus.hoff@ring2.dk> | 2020-10-03 13:46:22 +0200 |
commit | 000c18e7ccaf8a7e265b078211837c6fcf3e8179 (patch) | |
tree | 67d87ea5f5541109e9f273c73f71f40ceffdd567 /src/conf_mode/nat.py | |
parent | 1141bee72677b25d18436975625d2d298be503ff (diff) | |
parent | e4e75aacac93f320a20ad367bdfc8aa2c21596ef (diff) | |
download | vyos-1x-000c18e7ccaf8a7e265b078211837c6fcf3e8179.tar.gz vyos-1x-000c18e7ccaf8a7e265b078211837c6fcf3e8179.zip |
Merge remote-tracking branch 'upstream/current' into current
Diffstat (limited to 'src/conf_mode/nat.py')
-rwxr-xr-x | src/conf_mode/nat.py | 7 |
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') |