Bug 67901 - dhclient does not get DNS or hostname information from DHCP server
Summary: dhclient does not get DNS or hostname information from DHCP server
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: dhcp
Version: limbo
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Elliot Lee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 67217
TreeView+ depends on / blocked
 
Reported: 2002-07-04 01:00 UTC by Tom "spot" Callaway
Modified: 2008-05-01 15:38 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-07-16 21:09:42 UTC
Embargoed:


Attachments (Terms of Use)

Description Tom "spot" Callaway 2002-07-04 01:00:42 UTC
I filed this against dhcp, since there was no entry for dhclient. :P

Description of Problem:

dhclient does not appear to have any mechanism to acquire DNS or hostname
information from the DHCP server, none of the included configuration utilities
address this concern at all. both pump & dhcpcd perform this behavior in their
default configurations.

How Reproducible:

Always

Steps to Reproduce:
1. Install Limbo with dhclient (default)
2. Raise eth0 as DHCP.
3. Watch as nothing is entered into /etc/resolv.conf or as a hostname.
4. Rinse and repeat as many times as desired, with no change.

Actual Results:

No entries added to /etc/resolv.conf or hostname.

Expected Results:

Valid DNS servers put in /etc/resolv.conf, hostname set to correct entry. All
this information comes from the DHCP server (which is running dhcpd on my Red
Hat Linux 7.3 gateway box)

Additional Information:
	
The simple resolution to this is:

rpm -e dhclient
rpm -Uvh dhcpcd*.i386.rpm

Perhaps Red Hat should reconsider using such a broken (or perhaps simply cryptic
and undocumented) client as its default DHCP utility.

Comment 1 Thomas M Steenholdt 2002-07-06 07:11:40 UTC
I noticed this too, and located the problem (or at lease some of the problem in
/sbin/dhclient-script)

I modified the make_resolv_conf function to not REQUIRE both DNS info and DOMAIN
info to be available for a resolv.conf update to take place... 

Like this
-- snip ------------------------------------------
function make_resolv_conf() {
  if [ "x$new_domain_name" != "x" ] || [ "x$new_domain_name_servers" != "x" ]; then
    echo "; resolv.conf - generated by dhclient-script!" >/etc/resolv.conf
    if [ "x$new_domain_name" != "x" ];then
      echo search $new_domain_name >>/etc/resolv.conf
    fi
    if [ "x$new_domain_name_servers" != "x" ]; then
      for nameserver in $new_domain_name_servers; do
        echo nameserver $nameserver >>/etc/resolv.conf
      done
    fi
  fi
}
-- snip ------------------------------------------
This does the trick regarding the DNS servers missing from the resolv.conf

It's likely that there could be even more problems with this setup, regarding
options for domain (not just search) or others, but i'm not quite sure for the
moment



Comment 2 Elliot Lee 2002-07-11 18:05:39 UTC
The fix tmus posted makes some sense, I'll stick it in. Please try dhclient-3.0pl1-3 when it 
shows up in rawhide shortly, and see if it resolves the problem.

Comment 3 Thomas M Steenholdt 2002-07-16 21:09:38 UTC
I installed the new RPM here and it seems to me this bug was fixed

Comment 4 Jay Turner 2002-07-30 12:04:15 UTC
Taking the confirmation from tmus along with my own findings with
dhclient-3.0pl1-4 and closing this bug out.


Note You need to log in before you can comment on or make changes to this bug.