diff options
author | cyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-05-13 17:12:30 +0000 |
---|---|---|
committer | cyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-05-13 17:12:30 +0000 |
commit | a1e89c2ef68e5182a61afa95bce22282332598b6 (patch) | |
tree | d2df7a1c46988361c7c724c19818c8a82037ccce /package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | |
parent | e85e8e515bae09de251355b87a08d6162266b2f0 (diff) |
netifd: added support for setting up 6rd from DHCP
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36626 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/config/netifd/files/lib/netifd/proto/dhcp.sh')
-rwxr-xr-x | package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 6 |
1 files changed, 4 insertions, 2 deletions
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 38308785d..a270c681d 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -12,14 +12,15 @@ proto_dhcp_init_config() { proto_config_add_string "vendorid" proto_config_add_boolean "broadcast" proto_config_add_string "reqopts" + proto_config_add_string "iface6rd" } proto_dhcp_setup() { local config="$1" local iface="$2" - local ipaddr hostname clientid vendorid broadcast reqopts - json_get_vars ipaddr hostname clientid vendorid broadcast reqopts + local ipaddr hostname clientid vendorid broadcast reqopts iface6rd + json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd local opt dhcpopts for opt in $reqopts; do @@ -28,6 +29,7 @@ proto_dhcp_setup() { [ "$broadcast" = 1 ] && broadcast="-B" || broadcast= [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C" + [ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd" proto_export "INTERFACE=$config" proto_run_command "$config" udhcpc \ |