X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=package%2Fnetwork%2Fconfig%2Fnetifd%2Ffiles%2Flib%2Fnetifd%2Fproto%2Fdhcp.sh;fp=package%2Fnetwork%2Fconfig%2Fnetifd%2Ffiles%2Flib%2Fnetifd%2Fproto%2Fdhcp.sh;h=0481d05132133287928e3aeb8d6135c470782c46;hp=80668ee4fde7c0c0ade93f525d9d0d3f631c63ce;hb=9545d67d2df15d4ca856eb66db68b7c2d9828b9d;hpb=44f7ee43502b0632cef03fa068b0f97f862f56bd 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 \