diff options
-rw-r--r-- | python/vyos/configdict.py | 12 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-pppoe.py | 2 |
2 files changed, 11 insertions, 3 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': '', diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py index 231672490..611206d84 100755 --- a/src/conf_mode/interfaces-pppoe.py +++ b/src/conf_mode/interfaces-pppoe.py @@ -145,7 +145,7 @@ def get_config(): 'dhcpv6-options', 'prefix-delegation'] conf.set_level(dhcpv6_pd_path) - # retriebe DHCPv6-PD prefix helper length as some ISPs only hand out a + # Retrieve DHCPv6-PD prefix helper length as some ISPs only hand out a # /64 by default (https://phabricator.vyos.net/T2506) if conf.exists(['length']): pppoe['dhcpv6_pd_length'] = conf.return_value(['length']) |