diff options
author | Christian Breunig <christian@breunig.cc> | 2024-02-02 10:07:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-02 10:07:09 +0100 |
commit | eb41a9a96f5284d49156df9120316f46a6ad2f97 (patch) | |
tree | a4d4940464c07fd73fac6b0d0f541dcb342acc99 /python | |
parent | 4b0a78b0d2e4e0ea813e93b0842ae3aed15d1a43 (diff) | |
parent | dca220d515e6c1009b316400174382b88837df6c (diff) | |
download | vyos-1x-eb41a9a96f5284d49156df9120316f46a6ad2f97.tar.gz vyos-1x-eb41a9a96f5284d49156df9120316f46a6ad2f97.zip |
Merge pull request #2889 from sarthurdev/kea-hooks
dhcpv6: T3771: Installation of routes for delegated prefixes, add excluded-prefix to PD
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 |