diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2024-01-24 00:14:52 +0100 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2024-01-24 22:17:25 +0100 |
commit | 7253c8a3d4649e2c253a4d26c8123a65aedd46e7 (patch) | |
tree | d9f4eaaf3d77543f49929bb1659948c78b496529 /python | |
parent | 8e2112261c68189c2c78455c3e1f32d7f5447ab9 (diff) | |
download | vyos-1x-7253c8a3d4649e2c253a4d26c8123a65aedd46e7.tar.gz vyos-1x-7253c8a3d4649e2c253a4d26c8123a65aedd46e7.zip |
dhcpv6: T3316: Add support for excluded-prefix in prefix delegation
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/kea.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/python/vyos/kea.py b/python/vyos/kea.py index fb5afc2ce..720bebec3 100644 --- a/python/vyos/kea.py +++ b/python/vyos/kea.py @@ -237,11 +237,17 @@ def kea6_parse_subnet(subnet, config): if 'prefix' in config['prefix_delegation']: for prefix, pd_conf in config['prefix_delegation']['prefix'].items(): - pd_pools.append({ + pd_pool = { 'prefix': prefix, 'prefix-len': int(pd_conf['prefix_length']), 'delegated-len': int(pd_conf['delegated_length']) - }) + } + + if 'excluded_prefix' in pd_conf: + pd_pool['excluded-prefix'] = pd_conf['excluded_prefix'] + pd_pool['excluded-prefix-len'] = int(pd_conf['excluded_prefix_length']) + + pd_pools.append(pd_pool) out['pd-pools'] = pd_pools |