summaryrefslogtreecommitdiff
path: root/networking/udhcp/clientpacket.c
diff options
context:
space:
mode:
authorPaul Fox2005-09-22 18:59:13 +0000
committerPaul Fox2005-09-22 18:59:13 +0000
commit28de951b022d39516de271ce0ba53560aa3c5555 (patch)
treef5924f07643c8712acb65115bd50a7aa9ddb3603 /networking/udhcp/clientpacket.c
parent2f9c30a2d567ba7bdb6351e0167eb0b59735b898 (diff)
downloadbusybox-28de951b022d39516de271ce0ba53560aa3c5555.zip
busybox-28de951b022d39516de271ce0ba53560aa3c5555.tar.gz
add support for setting the dhcp vendor class option (option 60).
udhcpc now has a -V (--vendorclass), which will replace the default "udhcpRELEASE" string in this option.
Diffstat (limited to 'networking/udhcp/clientpacket.c')
-rw-r--r--networking/udhcp/clientpacket.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c
index 2695b06..528befd 100644
--- a/networking/udhcp/clientpacket.c
+++ b/networking/udhcp/clientpacket.c
@@ -69,18 +69,13 @@ unsigned long random_xid(void)
/* initialize a packet with the proper defaults */
static void init_packet(struct dhcpMessage *packet, char type)
{
- struct vendor {
- char vendor, length;
- char str[sizeof("udhcp "VERSION)];
- } vendor_id = { DHCP_VENDOR, sizeof("udhcp "VERSION) - 1, "udhcp "VERSION};
-
init_header(packet, type);
memcpy(packet->chaddr, client_config.arp, 6);
if (client_config.clientid)
add_option_string(packet->options, client_config.clientid);
if (client_config.hostname) add_option_string(packet->options, client_config.hostname);
if (client_config.fqdn) add_option_string(packet->options, client_config.fqdn);
- add_option_string(packet->options, (uint8_t *) &vendor_id);
+ add_option_string(packet->options, client_config.vendorclass);
}