From: Jo-Philipp Wich <jow@openwrt.org>
Date: Sun, 1 Jul 2012 12:43:14 +0000 (+0000)
Subject: netifd: repair dhcp client id option Busybox udhcpc dropped support for the -c option... 
X-Git-Tag: reboot~13481
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bcacf552fdbd524dc16142223e08032d1071c748;p=openwrt%2Fstaging%2Fblogic.git

netifd: repair dhcp client id option Busybox udhcpc dropped support for the -c option, instead it can be emulated by using -x 0x3d:id, change the dhcp protocol script accordingly and filter all colons from the id while we're at it. This change supersedes patchwork.openwrt.org/patch/1810/

SVN-Revision: 32573
---

diff --git a/package/netifd/files/lib/netifd/proto/dhcp.sh b/package/netifd/files/lib/netifd/proto/dhcp.sh
index 3365cb7aebc7..9182d58ad890 100755
--- a/package/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/netifd/files/lib/netifd/proto/dhcp.sh
@@ -35,7 +35,7 @@ proto_dhcp_setup() {
 		-f -t 0 -i "$iface" \
 		${ipaddr:+-r $ipaddr} \
 		${hostname:+-H $hostname} \
-		${clientid:+-c $clientid} \
+		${clientid:+-x 0x3d:${clientid//:/}} \
 		${vendorid:+-V $vendorid} \
 		$broadcast $dhcpopts
 }