Skip to content

Commit

Permalink
T5169: Allow to set CGNAT multiple internal pools
Browse files Browse the repository at this point in the history
Allow to set multiple CGNAT internal pools
```
set nat cgnat pool internal int-01 range '100.64.0.0/28'
set nat cgnat pool internal int-01 range '100.64.222.11-100.64.222.14'
```
  • Loading branch information
sever-sever committed May 18, 2024
1 parent a9e461e commit 2371c26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions interface-definitions/nat_cgnat.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
<validator name="ipv4-host"/>
<validator name="ipv4-range"/>
</constraint>
<multi/>
</properties>
</leafNode>
</children>
Expand Down
2 changes: 1 addition & 1 deletion src/conf_mode/nat_cgnat.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def generate(config):
int_pool_name: str = rule_config['source']['pool']

external_ranges: list = [range for range in config['pool']['external'][ext_pool_name]['range']]
internal_ranges: list = [config['pool']['internal'][int_pool_name]['range']]
internal_ranges: list = [range for range in config['pool']['internal'][int_pool_name]['range']]
external_list_hosts_count = []
external_list_hosts = []
internal_list_hosts_count = []
Expand Down

0 comments on commit 2371c26

Please sign in to comment.