Bug 7130

Summary: udhcpc - it's no possible to set required DHCP options
Product: Busybox Reporter: Matej Pastor <matej.pastor>
Component: NetworkingAssignee: unassigned
Status: RESOLVED INVALID    
Severity: enhancement CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Host: Target:
Build:

Description Matej Pastor 2014-05-31 22:31:42 UTC
Hi.

There isn't any command line option that allow set DHCP options required from DHCP server. There is only '-O ' switch - request DHCP option.

From isc-dhcp-client manual:

"The 'require' statement lists options that must be sent in order for an offer to be accepted. Offers that do not contain all the listed options will be ignored."

Best regards

Matej.
Comment 1 Denys Vlasenko 2014-06-02 00:16:50 UTC
> There isn't any command line option that allow set DHCP options required from
> DHCP server. There is only '-O ' switch - request DHCP option.
> 
> From isc-dhcp-client manual:

(Note: udhcpc is not a clone of isc-dhcp-client, thus its manual is not particularly relevant...)

> "The 'require' statement lists options that must be sent in order for an offer
> to be accepted. Offers that do not contain all the listed options will be
> ignored."

DHCP protocol per se doesn't have a notion of "require server to sent such and such options". Maximum client can do is to ask nicely for an option to be sent. Server may ignore such request.

If you want to exit if server did not sent an option you absolutely require, you can do so by analyzing environment variables in the dhcpc script.

Please take a look at files in examples/udhcp/