summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-pppoe.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-25 21:11:43 +0200
committerChristian Poessinger <christian@poessinger.com>2020-05-26 17:09:33 +0200
commit7dddfa338800303335673df637a05d8aaaccdaa2 (patch)
treefc79b7308429223ea2b47be32c213c36d0b729ba /src/conf_mode/interfaces-pppoe.py
parentd5b58517f88358c686e6c8ea039a7a9a64d6c6ee (diff)
downloadvyos-1x-7dddfa338800303335673df637a05d8aaaccdaa2.tar.gz
vyos-1x-7dddfa338800303335673df637a05d8aaaccdaa2.zip
dhcpv6-pd: T2506: add option to request specific prefix length
Some ISPs (e.g. Comcast) only delegate a /64 by default. You have to explicitly "ask" for a bigger (e.g. /60) prefix. This commit adds a CLI node to request a specific prefix length in the range 32 - 64. dhcpv6-options { prefix-delegation { length 60 } }
Diffstat (limited to 'src/conf_mode/interfaces-pppoe.py')
-rwxr-xr-xsrc/conf_mode/interfaces-pppoe.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py
index e8aeb810f..eaa61cdb6 100755
--- a/src/conf_mode/interfaces-pppoe.py
+++ b/src/conf_mode/interfaces-pppoe.py
@@ -36,6 +36,7 @@ default_config_data = {
'deleted': False,
'description': '\0',
'disable': False,
+ 'dhcpv6_pd_length': '',
'dhcpv6_pd_interfaces': [],
'intf': '',
'idle_timeout': '',
@@ -142,6 +143,11 @@ 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
+ # /64 by default (https://phabricator.vyos.net/T2506)
+ if conf.exists(['length']):
+ pppoe['dhcpv6_pd_length'] = conf.return_value(['length'])
+
for interface in conf.list_nodes(['interface']):
conf.set_level(dhcpv6_pd_path + ['interface', interface])
pd = {