aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/netifd/files
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2014-03-13 10:33:26 +0000
committerSteven Barth <cyrus@openwrt.org>2014-03-13 10:33:26 +0000
commitedd75e332c01b7156d18f71774aa7da042140296 (patch)
treeffee98633237db15f72e0c08eebe6cacf0c200af /package/network/config/netifd/files
parent7baf4957cfb764ff0958f3af0988ad8a83c700f3 (diff)
downloadupstream-edd75e332c01b7156d18f71774aa7da042140296.tar.gz
upstream-edd75e332c01b7156d18f71774aa7da042140296.tar.bz2
upstream-edd75e332c01b7156d18f71774aa7da042140296.zip
netifd: pass on delegate flag from dhcp to 6rd
SVN-Revision: 39909
Diffstat (limited to 'package/network/config/netifd/files')
-rwxr-xr-xpackage/network/config/netifd/files/lib/netifd/dhcp.script1
-rwxr-xr-xpackage/network/config/netifd/files/lib/netifd/proto/dhcp.sh6
2 files changed, 5 insertions, 2 deletions
diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script
index 77b77f5fec..c597840362 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -53,6 +53,7 @@ setup_interface () {
json_add_string ip6prefix "$ip6rdprefix"
json_add_int ip6prefixlen "$ip6rdprefixlen"
json_add_string tunlink "$INTERFACE"
+ [ -n "$IFACE6RD_DELEGATE" ] && json_add_boolean delegate "$IFACE6RD_DELEGATE"
json_close_object
ubus call network add_dynamic "$(json_dump)"
diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
index 80668ee4fd..0481d05132 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
@@ -14,14 +14,15 @@ proto_dhcp_init_config() {
proto_config_add_string 'reqopts:list(string)'
proto_config_add_string iface6rd
proto_config_add_string sendopts
+ proto_config_add_boolean delegate
}
proto_dhcp_setup() {
local config="$1"
local iface="$2"
- local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts
- json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts
+ local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate
+ json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate
local opt dhcpopts
for opt in $reqopts; do
@@ -35,6 +36,7 @@ proto_dhcp_setup() {
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
+ [ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0"
proto_export "INTERFACE=$config"
proto_run_command "$config" udhcpc \