From 0 Mon Sep 17 00:00:00 2001 From: Mikhail Efremov Date: Mon, 1 Oct 2012 20:05:08 +0400 Subject: [PATCH 11] dhclient: Add several command line options which etcnet expects. Based on dhcp-dhclient-options.patch, dhcp-4.2.2-dhclient-usage.patch from Fedora. Fix default_requested_options[] type. diff --git a/dhcp/client/clparse.c b/dhcp/client/clparse.c index defaced..defaced 100644 --- a/dhcp/client/clparse.c +++ b/dhcp/client/clparse.c @@ -192,6 +192,7 @@ isc_result_t read_client_conf () /* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache) */ top_level_config.requested_lease = 7200; + top_level_config.bootp_broadcast_always = 0; group_allocate (&top_level_config.on_receipt, MDL); if (!top_level_config.on_receipt) @@ -397,7 +398,8 @@ void read_client_leases () interface-declaration | LEASE client-lease-statement | ALIAS client-lease-statement | - KEY key-definition */ + KEY key-definition | + BOOTP_BROADCAST_ALWAYS */ void parse_client_statement (cfile, ip, config) struct parse *cfile; @@ -820,6 +822,11 @@ void parse_client_statement (cfile, ip, config) parse_lease_id_format(cfile); break; + case BOOTP_BROADCAST_ALWAYS: + token = next_token(&val, (unsigned*)0, cfile); + config -> bootp_broadcast_always = 1; + parse_semi (cfile); + return; default: lose = 0; diff --git a/dhcp/client/dhclient.8 b/dhcp/client/dhclient.8 index defaced..defaced 100644 --- a/dhcp/client/dhclient.8 +++ b/dhcp/client/dhclient.8 @@ -135,6 +135,33 @@ dhclient - Dynamic Host Configuration Protocol Client .B -w ] [ +.B -B +] +[ +.B -C +.I dhcp-client-identifier +] +[ +.B -H +.I host-name +] +[ +.B -F +.I fqdn.fqdn +] +[ +.B -V +.I vendor-class-identifier +] +[ +.B --request-options +.I request-option-list +] +[ +.B -timeout +.I timeout +] +[ .B --dad-wait-time .I seconds ] @@ -302,6 +329,68 @@ not to exit when it doesn't find any such interfaces. The program can then be used to notify the client when a network interface has been added or removed, so that the client can attempt to configure an IP address on that interface. + +.TP +.BI \-B +Set the BOOTP broadcast flag in request packets so servers will always +broadcast replies. + +.TP +.BI \-C\ +Specify the dhcp-client-identifier option to send to the DHCP server. + +.TP +.BI \-H\ +Specify the host-name option to send to the DHCP server. The host-name +string only contains the client's hostname prefix, to which the server will +append the ddns-domainname or domain-name options, if any, to derive the +fully qualified domain name of the client. The +.B -H +option cannot be used with the +.B -F +option. + +.TP +.BI \-F\ +Specify the fqdn.fqdn option to send to the DHCP server. This option cannot +be used with the +.B -H +option. The fqdn.fqdn option must specify the complete domain name of the +client host, which the server may use for dynamic DNS updates. + +.TP +.BI \-V\ +Specify the vendor-class-identifier option to send to the DHCP server. + +.TP +.BI \--request-options,\ \-request-options\