Commit 130c0f47 authored by Wu Fengguang's avatar Wu Fengguang Committed by David S. Miller
Browse files

ipconfig: send host-name in DHCP requests

Normally dhclient can be configured to send the "host-name" option
in DHCP requests to update the client's DNS record. However for an
NFSROOT system, dhclient shall never be called (which may change the
IP addr and therefore lose your root NFS mount connection).

So enable updating the DNS record with kernel parameter

Signed-off-by: default avatarWu Fengguang <>
Signed-off-by: default avatarDavid S. Miller <>
parent 614f60fa
......@@ -665,6 +665,13 @@ ic_dhcp_init_options(u8 *options)
memcpy(e, ic_req_params, sizeof(ic_req_params));
e += sizeof(ic_req_params);
if (ic_host_name_set) {
*e++ = 12; /* host-name */
len = strlen(utsname()->nodename);
*e++ = len;
memcpy(e, utsname()->nodename, len);
e += len;
if (*vendor_class_identifier) {
printk(KERN_INFO "DHCP: sending class identifier \"%s\"\n",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment