odhcp6c: pass on delegate-flag on to ds-lite interface
authorSteven Barth <cyrus@openwrt.org>
Thu, 13 Mar 2014 10:40:56 +0000 (10:40 +0000)
committerSteven Barth <cyrus@openwrt.org>
Thu, 13 Mar 2014 10:40:56 +0000 (10:40 +0000)
SVN-Revision: 39910

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

index 0b98b68232b093ff2038ce23a5a54487312bc894..d843c1076e8e201954a1cc8122b1ec8e4ca7dfc0 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=odhcp6c
-PKG_VERSION:=2014-03-11
+PKG_VERSION:=2014-03-13
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index 13732df0864c649cf765f39b936592bd8e5bc678..563c9ada0d03756727f2172804ee60eb6d4d6dd3 100755 (executable)
@@ -84,6 +84,7 @@ setup_interface () {
                json_add_string proto "dslite"
                json_add_string peeraddr "$AFTR_IP"
                json_add_string tunlink "$INTERFACE"
+               [ -n "$IFACE_DSLITE_DELEGATE" ] && json_add_boolean delegate "$IFACE_DSLITE_DELEGATE"
                json_close_object
                ubus call network add_dynamic "$(json_dump)"
        fi
index d8adb71696de248bf319b848fd9d0bc7df11cd0c..aa7a2e1b0888ce6e8b188cbe2937ddd6a9dc7f33 100755 (executable)
@@ -18,14 +18,15 @@ proto_dhcpv6_init_config() {
        proto_config_add_string 'sourcerouting:bool'
        proto_config_add_string "userclass"
        proto_config_add_string "vendorclass"
+       proto_config_add_boolean delegate
 }
 
 proto_dhcpv6_setup() {
        local config="$1"
        local iface="$2"
 
-       local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting userclass vendorclass
-       json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting userclass vendorclass
+       local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting userclass vendorclass delegate
+       json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting userclass vendorclass delegate
 
 
        # Configure
@@ -56,6 +57,7 @@ proto_dhcpv6_setup() {
        [ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix"
        [ -n "$iface_dslite" ] && proto_export "IFACE_DSLITE=$iface_dslite"
        [ "$sourcerouting" != "0" ] && proto_export "SOURCE_ROUTING=1"
+       [ "$delegate" = "0" ] && proto_export "IFACE_DSLITE_DELEGATE=0"
 
        proto_export "INTERFACE=$config"
        proto_run_command "$config" odhcp6c \