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=1e0aa68881dd795f8678d7a10f3f38eaa4025181;hp=a270c681d78edab9a907ff7a7f4a1e84a9f3dcdf;hb=ccc32df4267247c24f6ee5c02e3efcc1a3ab319a;hpb=60ace088071e21c6421cde4d44efc41e90f082da 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 a270c681d7..1e0aa68881 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -13,20 +13,25 @@ proto_dhcp_init_config() { proto_config_add_boolean "broadcast" proto_config_add_string "reqopts" proto_config_add_string "iface6rd" + proto_config_add_string "customopts" } proto_dhcp_setup() { local config="$1" local iface="$2" - local ipaddr hostname clientid vendorid broadcast reqopts iface6rd - json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd + local ipaddr hostname clientid vendorid broadcast reqopts iface6rd customopts + json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd customopts local opt dhcpopts for opt in $reqopts; do append dhcpopts "-O $opt" done + for opt in $customopts; do + append dhcpopts "-x $opt" + done + [ "$broadcast" = 1 ] && broadcast="-B" || broadcast= [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C" [ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"