diff options
| author | Daniil Baturin <daniil@vyos.io> | 2025-05-08 15:41:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-08 15:41:24 +0100 |
| commit | c8e468d4bf720f15e1c0232091399a45e8d9949b (patch) | |
| tree | 6e4fe0555cad1d02459dd25f033c6c9fcc2d84bf /src | |
| parent | f181c1357a0112f4c370b4c15edd80e80e3d6a96 (diff) | |
| parent | 43554efc27fcea6703b3b31674a38252434a0f2f (diff) | |
| download | vyos-1x-c8e468d4bf720f15e1c0232091399a45e8d9949b.tar.gz vyos-1x-c8e468d4bf720f15e1c0232091399a45e8d9949b.zip | |
Merge pull request #4484 from ryanzuwala/T7051
nat66: T7051: snat group as destination
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/nat66.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/nat66.py b/src/conf_mode/nat66.py index 95dfae3a5..c65950c9e 100755 --- a/src/conf_mode/nat66.py +++ b/src/conf_mode/nat66.py @@ -92,6 +92,10 @@ def verify(nat): if prefix != None: if not is_ipv6(prefix): raise ConfigError(f'{err_msg} source-prefix not specified') + + if 'destination' in config and 'group' in config['destination']: + if len({'address_group', 'network_group', 'domain_group'} & set(config['destination']['group'])) > 1: + raise ConfigError('Only one address-group, network-group or domain-group can be specified') if dict_search('destination.rule', nat): for rule, config in dict_search('destination.rule', nat).items(): |
