Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Sep 2002 18:11:30 -0700
From:      Darren Pilgrim <dmp@pantherdragon.org>
To:        Gavin Atkinson <gavin@ury.york.ac.uk>
Cc:        "Bruce A. Mah" <bmah@FreeBSD.ORG>, Murray Stokely <murray@FreeBSD.ORG>, stable@FreeBSD.ORG, qa@FreeBSD.ORG
Subject:   Re: -STABLE Frozen for 4.7
Message-ID:  <3D7AA3C2.B7A403B4@pantherdragon.org>
References:  <Pine.BSF.4.33.0209072304030.24905-100000@ury.york.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------5370841F485B65FC17952654
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Gavin Atkinson wrote:
> 
> On Sat, 7 Sep 2002, Bruce A. Mah wrote:
> > If memory serves me right, Gavin Atkinson wrote:
> > > I would really like the problems with the isc-dhcp dhclient utility that
> > > were in 4.6-RELEASE to be  fixed for 4.7, rather than having another
> > > errata item about the same problem
> >
> > What problems and what errata item?
> 
> Looking at it it does not seem that the errata item exists, though i was
> sure it did. Anyway, the problem I refer to is
> 
> http://www.FreeBSD.org/cgi/getmsg.cgi?fetch=986596+989688+/usr/local/www/db/text/2002/freebsd-stable/20020519.freebsd-stable
> and the patch is
> http://www.FreeBSD.org/cgi/getmsg.cgi?fetch=1164730+0+/usr/local/www/db/text/2002/freebsd-stable/20020519.freebsd-stable

Aside from failing to die gracefully when it's interface is lost,
there really isn't a problem with dhclient.  It's reasonable to expect
the dhcp program to be killed when an interface is dettached.  In
fact, the pccard system is configured to kill the dhcp program upon
dettach.

When an ethernet device is dettached, pccardd runs pccard_ether as
part of the stopping process.  pccard_ether, when told to stop an
interface, looks for /var/run/[dhclient|dhcpc].${interface}.pid and,
if found, kills the corresponding process.

The problem is that, when rc.network starts $dhcp_program to configure
DHCP interfaces, it runs a single process for all interfaces and lets
dhclient use the default pidfile of /var/run/dhclient.pid.  This means
that pccard_ether doesn't find the running dhclient process and
shouldn't kill it because dhclient may be serving multiple interfaces.

One fix is to make rc.network run one $dhcp_program per DHCP
interface and specify the pidfile pccard_ether looks for.  Included is
a patch for rc.network.  The patch is against 4.6.2-R, but should work
with -stable.  Please test it for me as I don't have anything with
PCCard slots running FreeBSD.

I'll submit the PR if needed.
--------------5370841F485B65FC17952654
Content-Type: text/plain; charset=us-ascii;
 name="rc_network.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="rc_network.diff"

--- /usr/src/etc/rc.network	Tue Jul 16 05:33:21 2002
+++ /etc/rc.network	Sat Sep  7 17:33:35 2002
@@ -208,7 +208,9 @@
 	done
 
 	if [ ! -z "${dhcp_interfaces}" ]; then
-		${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces}
+		for dhcp_interface in ${dhcp_interfaces}; do
+			${dhcp_program:-/sbin/dhclient} ${dhcp_flags} -pf /var/run/dhclient.${dhcp_interface}.pid ${dhcp_interface}
+		done
 	fi
 
 	for ifn in ${network_interfaces}; do

--------------5370841F485B65FC17952654--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D7AA3C2.B7A403B4>