PATCH: udhcpc -- don't request set of options by default

L. Gabriel Somlo somlo at cmu.edu
Wed Apr 2 00:58:37 UTC 2008


> I am thinking - maybe we should just junk the idea of "default"
> options to ask for? We can ask user to always provide explicit
> list of -O OPTs to ask. What do you think?

I agree. Although others might yell at us if we change default
behavior :)

> Please take a look at attached patch - will this work for you?
>  
...
>  
> +	if (client_config.no_default_options)
> +		return;
> +

This returns before -O explicit options have a chance to be added,
doesn't it ?

>  	packet->options[end + OPT_CODE] = DHCP_PARAM_REQ;
>  	for (i = 0; (c = dhcp_options[i].code) != 0; i++) {
>  		if ((dhcp_options[i].flags & OPTION_REQ)
> @@ -107,7 +110,9 @@ int send_discover(uint32_t xid, uint32_t
>  	/* Explicitly saying that we want RFC-compliant packets helps
>  	 * some buggy DHCP servers to NOT send bigger packets */
>  	add_simple_option(packet.options, DHCP_MAX_SIZE, htons(576));

Junking default options altogether definitely feels cleaner, no need
to monkey around with all this '-o' stuff... :) Would anyone be truly
horrified to see that happen ?

BTW, I really did like the [[ %udhcpc_opts%]] idea, I'd like that at
least to stay... :)

Thanks,
--Gabriel



More information about the busybox mailing list