diff options
author | Christian Breunig <christian@breunig.cc> | 2023-08-23 20:19:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-23 20:19:45 +0200 |
commit | 7659c452f8d390773e48e5873552bde601e2fbca (patch) | |
tree | 482e10bf507ff9153a80dfab0b56400c8e9a66bf /src/conf_mode/nat.py | |
parent | b1886e35e5166034f60541cb4a1020c000627b8c (diff) | |
parent | f0ae034faa74a90ee3c98d31bfd8df2ae0513c7f (diff) | |
download | vyos-1x-7659c452f8d390773e48e5873552bde601e2fbca.tar.gz vyos-1x-7659c452f8d390773e48e5873552bde601e2fbca.zip |
Merge pull request #2162 from nicolas-fort/T5472
T5472: nat redirect: allow redirection without defining redirected port
Diffstat (limited to 'src/conf_mode/nat.py')
-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') |