diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2024-01-13 00:28:01 +0100 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2024-01-13 02:37:30 +0100 |
commit | 45d472c8782f927980044eaba0d49421e91fc0c8 (patch) | |
tree | 0d532f2fbc3218ac9be69f7146270e73a5172b87 /src/op_mode | |
parent | bc3cf0a0a18ad70448322f90bdb6bf8292b59ccf (diff) | |
download | vyos-1x-45d472c8782f927980044eaba0d49421e91fc0c8.tar.gz vyos-1x-45d472c8782f927980044eaba0d49421e91fc0c8.zip |
dhcpv6: T3316: Move options to separate node and extend scopes
* Also migrate `address-range` to `range` tag node for consistency with dhcpv4 server syntax
Diffstat (limited to 'src/op_mode')
-rwxr-xr-x | src/op_mode/dhcp.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/op_mode/dhcp.py b/src/op_mode/dhcp.py index 02f4d5bbb..a64acec31 100755 --- a/src/op_mode/dhcp.py +++ b/src/op_mode/dhcp.py @@ -194,14 +194,11 @@ def _get_pool_size(pool, family='inet'): size = 0 subnets = config.list_nodes(f'{base} subnet') for subnet in subnets: - if family == 'inet6': - ranges = config.list_nodes(f'{base} subnet {subnet} address-range start') - else: - ranges = config.list_nodes(f'{base} subnet {subnet} range') + ranges = config.list_nodes(f'{base} subnet {subnet} range') for range in ranges: if family == 'inet6': - start = config.list_nodes(f'{base} subnet {subnet} address-range start')[0] - stop = config.value(f'{base} subnet {subnet} address-range start {start} stop') + start = config.value(f'{base} subnet {subnet} range {range} start') + stop = config.value(f'{base} subnet {subnet} range {range} stop') else: start = config.value(f'{base} subnet {subnet} range {range} start') stop = config.value(f'{base} subnet {subnet} range {range} stop') |