Hi all,
Dnsmasq supports the "vendorclass" (60), "clientid" (61) and "userclass" (77) DHCP options being sent from DHCP clients. But the busybox udhcp client by default does not support sending these options to the server.
It would be nice if the udhcp client has these options as it would be then possible to set up dnsmasq to serve different dhcp paramaters based upon what kind of client it was talking to (as long as the client is set up to identify itself to the server). For instance, in a mesh network where some clients may be other OpenWRT boxes, some may be i386 Linux boxes and some Windows boxes.
This patch adds these options to the udhcp client:
--- busybox-1.00_orig/networking/udhcp/options.c 2004-03-15 19:29:01.000000000 +1100
+++ busybox-1.00/networking/udhcp/options.c 2005-09-15 15:51:56.000000000 +1000
@@ -39,8 +39,11 @@
{"dhcptype", OPTION_U8, 0x35},
{"serverid", OPTION_IP, 0x36},
{"message", OPTION_STRING, 0x38},
+ {"vendorclass", OPTION_STRING, 0x3C},
+ {"clientid", OPTION_STRING, 0x3D},
{"tftp", OPTION_STRING, 0x42},
- {"bootfile", OPTION_STRING, 0x43},
+ {"bootfile", OPTION_STRING, 0x43},
+ ("userclass", OPTION_STRING, 0x4D},
{"", 0x00, 0x00}
};