From 87fa216e1e388c537cda2cff126eea816a4135ac Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 20 Mar 2010 18:06:23 +0100 Subject: udhcpc: make it possible to disable vendor id; improve help text function old new delta init_packet 135 139 +4 packed_usage 26789 26786 -3 alloc_dhcp_option 67 63 -4 udhcpc_main 2467 2447 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 4/-27) Total: -23 bytes Signed-off-by: Denys Vlasenko --- networking/udhcp/clientpacket.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'networking/udhcp/clientpacket.c') diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c index f091d8067..a255d6e84 100644 --- a/networking/udhcp/clientpacket.c +++ b/networking/udhcp/clientpacket.c @@ -47,8 +47,12 @@ static void init_packet(struct dhcp_packet *packet, char type) add_option_string(packet->options, client_config.hostname); if (client_config.fqdn) add_option_string(packet->options, client_config.fqdn); - if ((type != DHCPDECLINE) && (type != DHCPRELEASE)) + if (type != DHCPDECLINE + && type != DHCPRELEASE + && client_config.vendorclass + ) { add_option_string(packet->options, client_config.vendorclass); + } } -- cgit v1.2.3