summaryrefslogtreecommitdiff
path: root/src/op_mode/dhcp.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-01-13 20:12:33 +0100
committerGitHub <noreply@github.com>2024-01-13 20:12:33 +0100
commit9753fafbfed02a3b6ebe7b6ddf51783c5dcbcf62 (patch)
tree929c8b42867462edad25b8028bac07b78c89b6fb /src/op_mode/dhcp.py
parentfef091bd6dc5c3cdfae47e9adb86f610a75a8a4d (diff)
parent2d4db25386fcefd301868a4daa39d5578cbac779 (diff)
downloadvyos-1x-9753fafbfed02a3b6ebe7b6ddf51783c5dcbcf62.tar.gz
vyos-1x-9753fafbfed02a3b6ebe7b6ddf51783c5dcbcf62.zip
Merge pull request #2817 from sarthurdev/kea6-options
dhcpv6: T3316: Extend scope of DHCP options, bugfixes
Diffstat (limited to 'src/op_mode/dhcp.py')
-rwxr-xr-xsrc/op_mode/dhcp.py9
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')