summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-06 01:01:44 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-06 01:01:44 +0200
commit728b1feaf7444545100b9cba7977c90b75f01029 (patch)
tree0e290fc974b44061c30c11c6a286f1fa0bf67a8d /python
parent886a986a122ee0a502c863dd34fa883694fb8fc2 (diff)
downloadvyos-1x-728b1feaf7444545100b9cba7977c90b75f01029.tar.gz
vyos-1x-728b1feaf7444545100b9cba7977c90b75f01029.zip
dhcpv6-pd: T2551: fix prefix length not set in config
Retrieving the CLI nodes from current config was missed out and only implemented for PPPoE.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configdict.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index ead7e8637..824ca1f71 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -235,8 +235,16 @@ def intf_to_dict(conf, default):
# DHCPv6 prefix delegation (RFC3633)
current_level = conf.get_level()
if conf.exists(['dhcpv6-options', 'prefix-delegation']):
- for interface in conf.list_nodes(['dhcpv6-options', 'prefix-delegation', 'interface']):
- conf.set_level(current_level + ['dhcpv6-options', 'prefix-delegation', 'interface', interface])
+ dhcpv6_pd_path = current_level + ['dhcpv6-options', 'prefix-delegation']
+ conf.set_level(dhcpv6_pd_path)
+
+ # retriebe DHCPv6-PD prefix helper length as some ISPs only hand out a
+ # /64 by default (https://phabricator.vyos.net/T2506)
+ if conf.exists(['length']):
+ intf['dhcpv6_pd_length'] = conf.return_value(['length'])
+
+ for interface in conf.list_nodes(['interface']):
+ conf.set_level(current_level + ['interface', interface])
pd = {
'ifname': interface,
'sla_id': '',