diff options
author | Nicolas Fort <nicolasfort1988@gmail.com> | 2023-08-23 13:00:27 +0000 |
---|---|---|
committer | Nicolas Fort <nicolasfort1988@gmail.com> | 2023-08-23 13:00:27 +0000 |
commit | f0ae034faa74a90ee3c98d31bfd8df2ae0513c7f (patch) | |
tree | 0db2f209030e14edcde49c991f55f93d34ad7b62 /src | |
parent | 8c7fbec24f8bfe064d8ad804951f5ae59b54748f (diff) | |
download | vyos-1x-f0ae034faa74a90ee3c98d31bfd8df2ae0513c7f.tar.gz vyos-1x-f0ae034faa74a90ee3c98d31bfd8df2ae0513c7f.zip |
T5472: nat redirect: allow redirection without defining redirected port
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/nat.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/nat.py b/src/conf_mode/nat.py index f9d711b36..9da7fbe80 100755 --- a/src/conf_mode/nat.py +++ b/src/conf_mode/nat.py @@ -224,7 +224,7 @@ def verify(nat): elif config['inbound_interface'] not in 'any' and config['inbound_interface'] not in interfaces(): Warning(f'rule "{rule}" interface "{config["inbound_interface"]}" does not exist on this system') - if not dict_search('translation.address', config) and not dict_search('translation.port', config) and not dict_search('translation.redirect.port', config): + if not dict_search('translation.address', config) and not dict_search('translation.port', config) and 'redirect' not in config['translation']: if 'exclude' not in config and 'backend' not in config['load_balance']: raise ConfigError(f'{err_msg} translation requires address and/or port') |