Bug 19673

Summary: dhclient-script will not always set the hostname after a reboot
Product: Base System Reporter: adrian <adrian>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description adrian 2000-07-03 17:10:01 UTC
	The first time a system is booted using dhclient, the
	acquired lease information is written to /var/db/dhclient.leases.
	The next time the system is rebooted, dhclient will use
	these values to initialized the old_* variables when running
	the dhclient-script.  If the hostname does not change
	bewteen reboots, the lease file is not removed or the lease
	does not expire, there is a logic bug that will cause
	dhclient to not set the hostname at all.

Fix: Apply the the included patch for dhclient-script as follows:

	cd /src/contrib/isc-dhcp/client/scripts
	patch freebsd < /tmp/dhcp-script.diff

	N.B.  Since dhclient is built from contributed sources, I
	am sending the patch to ISC as well so that they can include
	it in the base distribution.
How-To-Repeat: 
	Do not set hostname in /etc/rc.conf, then boot using DHCP with a
	statically configured hostname/MAC/IP set up on the DHCP server.
	Reboot again and make sure your system recieved the same hostname
	info from the lease as before.  The hostname will not be set even
	though the IP and other info was.
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-07-04 17:17:42 UTC
Responsible Changed
From-To: freebsd-bugs->obrien

DHCP is David's baby.
Comment 2 David E. O'Brien freebsd_committer freebsd_triage 2000-12-23 19:20:47 UTC
Responsible Changed
From-To: obrien->freebsd-bugs

I am not the single dhclient maintainer now.
Comment 3 jkh 2001-03-27 23:03:15 UTC
Well, this one is problematic.  The script lives elsewhere in -current,
where it's easy to edit, but on the vendor branch in contrib in -stable,
which I'm loath to take it off.  Any luck in simply getting the ISC to
accept this change instead?
Comment 4 adrian 2001-03-28 04:20:43 UTC
> > Jordan Hubbard wrote:
> >
> > > The following reply was made to PR misc/19673; it has been noted by GNATS.
> > >
> > > From: Jordan Hubbard <jkh@osd.bsdi.com>
> > > To: freebsd-gnats-submit@FreeBSD.org
> > > Cc:
> > > Subject: Re: misc/19673
> > > Date: Tue, 27 Mar 2001 14:03:15 -0800
> > >
> > >  Well, this one is problematic.  The script lives elsewhere in -current,
> > >  where it's easy to edit, but on the vendor branch in contrib in -stable,
> > >  which I'm loath to take it off.  Any luck in simply getting the ISC to
> > >  accept this change instead?

	Sigh.  I did this originally as noted in my original PR.  It seems
to have disappeared into a black hole.  If someone else with more traction
with the ISC could get them to do this, that would be great.  Of course
this probably won't happen before 4.3-RELEASE, so we would be stuck with
the bug.

	Adrian
--
[ adrian@ubergeeks.com ]
Comment 5 Mike Barcroft freebsd_committer freebsd_triage 2001-07-22 05:48:56 UTC
State Changed
From-To: open->feedback


Does this problem still occur in newer versions of FreeBSD, 
such as 4.3-RELEASE?  If it is, would you mind retrying ISC?
Comment 6 mheffner 2001-07-22 18:26:28 UTC
I believe this was still a problem when I looked at the code.

On 22-Jul-2001 mike@FreeBSD.org wrote:
| Synopsis: dhclient-script will not always set the hostname after a reboot
| 
| State-Changed-From-To: open->feedback
| State-Changed-By: mike
| State-Changed-When: Sat Jul 21 21:48:56 PDT 2001
| State-Changed-Why: 
| 
| Does this problem still occur in newer versions of FreeBSD,
| such as 4.3-RELEASE?  If it is, would you mind retrying ISC?
| 
| http://www.FreeBSD.org/cgi/query-pr.cgi?pr=19673
| 
| To Unsubscribe: send mail to majordomo@FreeBSD.org
| with "unsubscribe freebsd-bugs" in the body of the message


Mike

-- 
  Mike Heffner         <mheffner@[acm.]vt.edu>
  Fredericksburg, VA       <mikeh@FreeBSD.org>
Comment 7 Mike Barcroft freebsd_committer freebsd_triage 2001-07-22 21:01:27 UTC
On Sun, Jul 22, 2001 at 02:59:36PM -0400, Adrian Filipi-Martin wrote:
> On Sat, 21 Jul 2001 mike@FreeBSD.org wrote:
> 
> > Does this problem still occur in newer versions of FreeBSD,
> > such as 4.3-RELEASE?  If it is, would you mind retrying ISC?
> >
> 
> 	Yes, it definitely does.
> 
> 	I'll try again.  Seems like it should be a problem for lots of
> people, so I'm mystified as to why it hasn't been addressed.

Yes, another person confirmed this is still a bug.  Will you be sure
to keep us up-to-date on how you make out with ISC?

Best regards,
Mike Barcroft
Comment 8 Sheldon Hearn freebsd_committer freebsd_triage 2002-01-18 16:14:39 UTC
State Changed
From-To: feedback->closed

Automatic feedback timeout.  If additional feedback that warrants 
the re-opening of this PR is available but not included in the 
audit trail, please include the feedback in a reply to this message 
(preserving the Subject line) and ask that the PR be re-opened.