Bug 95905 - [PATCH] /etc/rc.d/dhclient doesn't interact well with the ports isc dhcp client
Summary: [PATCH] /etc/rc.d/dhclient doesn't interact well with the ports isc dhcp client
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 6.1-BETA4
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-17 05:00 UTC by leres
Modified: 2008-05-15 03:00 UTC (History)
0 users

See Also:


Attachments
file.diff (321 bytes, patch)
2006-04-17 05:00 UTC, leres
no flags Details | Diff
patchbase-Makefile.in (1.19 KB, application/text)
2006-04-17 09:07 UTC, leres
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description leres 2006-04-17 05:00:31 UTC
	The test in /etc/rc.d/dhclient that is supposed to prevent
	dhclient from being launched if one is already running
	doesn't work with the ports version of dhclient. If you
	have an interface configured for dhcp in /etc/rc.conf,
	dhclient runs and gets a lease normally but then is run
	again later at which point it sets the interface address
	to 0.0.0.0, ending network access via that NIC.

Fix: The simplest solution is to check /var/run/dhclient.pid in
	addition doing the pgrep test that's already in the rc
	script. The appended patch implements this.

	A more complete solution would be to also change the base
	version of dhclient to manage the /var/run/dhclient.pid
	file and remove the pgrep test from the rc.d script.

	(If there is interest in that, I'd be happy to generate the
	diffs.)

	
*** dhclient	2006/04/17 02:59:17	1.1
--- dhclient	2006/04/17 03:35:20
***************
How-To-Repeat: 	Install the isc-dhcp3-client and configure a NIC to use it:

	    ifconfig_em0="dhcp"

	Then reboot. The interface will come up when dhclient runs.
	Later when it's run again, you'll see this message:

	    Internet Systems Consortium DHCP Client V3.0.3 
	    Copyright 2004-2005 Internet Systems Consortium.
	    All rights reserved.
	    For info, please visit http://www.isc.org/products/DHCP
	    Listening on BPF/em0/00:30:48:00:00:01
	    Sending on   BPF/em0/00:30:48:00:00:01
	    Can't bind to dhcp address: Address already in use
	    Please make sure there is no other dhcp server
	    running and that there's no entry for dhcp or
	    bootp in /etc/inetd.conf.   Also make sure you
	    are not running HP JetAdmin software, which
	    includes a bootp server.

	At this point the original dhclient is still running but
	the interface is misconfigured and you're hosed.
Comment 1 leres 2006-04-17 09:07:39 UTC
Let me see if I can get mh to mime that patch a better way...

		Craig
Comment 2 leres 2006-04-17 20:00:08 UTC
(Sorry, I managed to send that last followup with the wrong pr id
-- please disregard.)
Comment 3 Brooks Davis freebsd_committer 2006-05-13 05:16:28 UTC
Responsible Changed
From-To: freebsd-bugs->brooks

I'm the dhclient maintainer. 

If possible I'd like to have this work by setting the $pidfile 
variable rather than the current logic because I plan to add 
pidfile support to the in tree dhclient.
Comment 4 dfilter freebsd_committer 2008-04-16 00:03:45 UTC
brooks      2008-04-15 23:03:35 UTC

  FreeBSD src repository

  Modified files:
    etc/rc.d             dhclient 
  Log:
  Add very limited support for the isc-dhclient.  It will almostly certaintly
  only work if there's just one interface doing dhcp.  This version implements
  the same logic as the version in the PR, but uses pgrep to be less verbose.
  
  PR:             conf/95905
  MFC after:      1 week
  
  Revision  Changes    Path
  1.32      +4 -0      src/etc/rc.d/dhclient
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Brooks Davis freebsd_committer 2008-04-16 00:03:48 UTC
State Changed
From-To: open->patched

Finally committed a patch to HEAD.
Comment 6 dfilter freebsd_committer 2008-05-15 02:53:17 UTC
brooks      2008-05-15 01:53:09 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    etc/rc.d             dhclient 
  Log:
  MFC: Add very limited support for the isc-dhclient. It will almostly certaintly
  only work if there's just one interface doing dhcp. This version implements
  the same logic as the version in the PR, but uses pgrep to be less verbose.
  
  PR:             conf/95905
  
  Revision  Changes    Path
  1.28.2.3  +4 -0      src/etc/rc.d/dhclient
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 dfilter freebsd_committer 2008-05-15 02:53:51 UTC
brooks      2008-05-15 01:53:46 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    etc/rc.d             dhclient 
  Log:
  MFC: Add very limited support for the isc-dhclient. It will almostly certaintly
  only work if there's just one interface doing dhcp. This version implements
  the same logic as the version in the PR, but uses pgrep to be less verbose.
  
  PR:             conf/95905
  
  Revision  Changes    Path
  1.20.2.7  +4 -0      src/etc/rc.d/dhclient
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 8 Brooks Davis freebsd_committer 2008-05-15 02:55:24 UTC
State Changed
From-To: patched->closed

Merged to 6 and 7.