diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-05-26 20:54:07 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-05-26 20:54:07 +0200 |
commit | 825059e83237dd389d461257e1b46625084702df (patch) | |
tree | 47d50cde1195279ab5b6367b84ff60568620262a /data | |
parent | 62fd70e83c2f147f84f8fb3def5b384d4f56695d (diff) | |
parent | 8ff6d2ed6025fb113a180e3c23be83dac7169658 (diff) | |
download | vyos-1x-825059e83237dd389d461257e1b46625084702df.tar.gz vyos-1x-825059e83237dd389d461257e1b46625084702df.zip |
Merge branch 'dhcpv6-pd-t2506' of github.com:c-po/vyos-1x into current
* 'dhcpv6-pd-t2506' of github.com:c-po/vyos-1x:
dhcpv6-pd: T2506: use common dictionary definition for config parameters
dhcpv6-pd: T2506: add option to request specific prefix length
dhcpv6-pd: pppoe: T2506: restructure CLI
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/dhcp-client/ipv6.tmpl | 9 | ||||
-rw-r--r-- | data/templates/pppoe/ip-down.script.tmpl | 2 | ||||
-rw-r--r-- | data/templates/pppoe/ipv6-up.script.tmpl | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/data/templates/dhcp-client/ipv6.tmpl b/data/templates/dhcp-client/ipv6.tmpl index 6cfe24d3e..490f14726 100644 --- a/data/templates/dhcp-client/ipv6.tmpl +++ b/data/templates/dhcp-client/ipv6.tmpl @@ -10,7 +10,7 @@ interface {{ ifname }} { {% if not dhcpv6_temporary %} send ia-na 1; # non-temporary address {% endif %} -{% if dhcpv6_pd %} +{% if dhcpv6_pd_interfaces %} send ia-pd 2; # prefix delegation {% endif %} }; @@ -21,9 +21,12 @@ id-assoc na 1 { }; {% endif %} -{% if dhcpv6_pd %} +{% if dhcpv6_pd_interfaces %} id-assoc pd 2 { -{% for intf in dhcpv6_pd %} +{% if dhcpv6_pd_length %} + prefix ::/{{ dhcpv6_pd_length }} infinity; +{% endif %} +{% for intf in dhcpv6_pd_interfaces %} prefix-interface {{ intf.ifname }} { {% if intf.sla_id %} sla-id {{ intf.sla_id }}; diff --git a/data/templates/pppoe/ip-down.script.tmpl b/data/templates/pppoe/ip-down.script.tmpl index fe8fd7584..c4e11b6b4 100644 --- a/data/templates/pppoe/ip-down.script.tmpl +++ b/data/templates/pppoe/ip-down.script.tmpl @@ -27,7 +27,7 @@ fi vtysh -c "conf t" ${VRF_NAME} -c "no ip route 0.0.0.0/0 {{ intf }} ${VRF_NAME}" {% endif %} -{% if dhcpv6_pd %} +{% if dhcpv6_pd_interfaces %} # Start wide dhcpv6 client systemctl stop dhcp6c@{{ intf }}.service {% endif %} diff --git a/data/templates/pppoe/ipv6-up.script.tmpl b/data/templates/pppoe/ipv6-up.script.tmpl index 90873229a..e795d5b0c 100644 --- a/data/templates/pppoe/ipv6-up.script.tmpl +++ b/data/templates/pppoe/ipv6-up.script.tmpl @@ -40,7 +40,7 @@ echo 2 > /proc/sys/net/ipv6/conf/{{ intf }}/accept_ra echo 1 > /proc/sys/net/ipv6/conf/{{ intf }}/autoconfigure {% endif %} -{% if dhcpv6_pd %} +{% if dhcpv6_pd_interfaces %} # Start wide dhcpv6 client systemctl start dhcp6c@{{ intf }}.service {% endif %} |