odhcp6c: add RFC 7278 3gpp IPv6 prefix extension
authorSteven Barth <cyrus@openwrt.org>
Thu, 3 Sep 2015 15:53:33 +0000 (15:53 +0000)
committerSteven Barth <cyrus@openwrt.org>
Thu, 3 Sep 2015 15:53:33 +0000 (15:53 +0000)
Use option extendprefix 1 to enable

Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 46779

package/network/ipv6/odhcp6c/Makefile
package/network/ipv6/odhcp6c/files/dhcpv6.script
package/network/ipv6/odhcp6c/files/dhcpv6.sh

index aa81e02dcab2f05965c37ca804d1070288952afa..4968631d6f40f365a554ba1887c834b35f67a682 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=odhcp6c
-PKG_VERSION:=2015-07-29
+PKG_VERSION:=2015-09-03
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index 677d35f4f92e82d6a7fe9ca01a35e071097baca8..3177eefbf7773389e30518dc40d4eeaf8f7fb2d7 100755 (executable)
@@ -77,6 +77,11 @@ setup_interface () {
                                -z "$RA_DNS" -a "$FAKE_ROUTES" = 1 ]; then
                        RA_ROUTES="::/0,$SERVER,$valid,4096"
                fi
+
+               # RFC 7278
+               if [ "$mask" -eq 64 -a -z "$PREFIXES" -a -n "$EXTENDPREFIX" ]; then
+                       proto_add_ipv6_prefix "$entry"
+               fi
        done
 
        for entry in $RA_ROUTES; do
index 4a453fdc4d94d9298067a986b0e4c6054b6c0a60..6c47399916a35e91304a3c35295841cac8447df7 100755 (executable)
@@ -13,6 +13,7 @@ proto_dhcpv6_init_config() {
        proto_config_add_string 'reqopts:list(uinteger)'
        proto_config_add_string 'noslaaconly:bool'
        proto_config_add_string 'forceprefix:bool'
+       proto_config_add_string 'extendprefix:bool'
        proto_config_add_string 'norelease:bool'
        proto_config_add_string 'ip6prefix:ip6addr'
        proto_config_add_string iface_dslite
@@ -35,8 +36,8 @@ proto_dhcpv6_setup() {
        local config="$1"
        local iface="$2"
 
-       local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
-       json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
+       local reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
+       json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
 
 
        # Configure
@@ -78,6 +79,7 @@ proto_dhcpv6_setup() {
        [ -n "$zone" ] && proto_export "ZONE=$zone"
        [ "$fakeroutes" != "0" ] && proto_export "FAKE_ROUTES=1"
        [ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1"
+       [ "$extendprefix" = "1" ] && proto_export "EXTENDPREFIX=1"
 
        proto_export "INTERFACE=$config"
        proto_run_command "$config" odhcp6c \