Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 May 2002 12:46:39 -0400
From:      Peter Radcliffe <pir@pir.net>
To:        stable@FreeBSD.org
Subject:   Re: BUG: isc-dhcp dhclient infinite loop regression in 4.6-PRE
Message-ID:  <20020518164639.GB15611@pir.net>
In-Reply-To: <200205171157.g4HBvUWs091777@hak.lan.Awfulhak.org>
References:  <Pine.BSF.4.33.0205171150030.17319-100000@ury.york.ac.uk> <200205171157.g4HBvUWs091777@hak.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian Somers <brian@Awfulhak.org> probably said:
> As Murray's pretty much busy with real life at the moment, can I ask 
> you to try this patch ?
> 
> It's not the best way of dealing with this - especially if dhclient 
> is running on more than one interface, but there's no infrastructure 
> there for handling interfaces disappearing, and my understanding of 
> the code is practically zero.

My hack for this, in isc-dhcp3's dhclient, was in the same place, but
I checked the errno to see if it was "device not configured" rather
than just if the received packet failed. I've been using it on my
laptop - where indeed I don't need to normally worry about multiple
dhcp interfaces - for the last month or two to solve the same problem.

I've only seen dhclient going into the spinning mode where it uses up
all CPU after 'device not configured' and I didn't want to exit on
some errors that may not be perminant.

P.

===================================================================
*** discover.c.old	Sat May 18 12:39:55 2002
--- discover.c	Sat May 18 12:41:22 2002
***************
*** 755,762 ****
        again:
  	if ((result =
  	     receive_packet (ip, u.packbuf, sizeof u, &from, &hfrom)) < 0) {
! 		log_error ("receive_packet failed on %s: %m", ip -> name);
! 		return ISC_R_UNEXPECTED;
  	}
  	if (result == 0)
  		return ISC_R_UNEXPECTED;
--- 755,766 ----
        again:
  	if ((result =
  	     receive_packet (ip, u.packbuf, sizeof u, &from, &hfrom)) < 0) {
!   	       if ( errno == ENXIO ) {
!                log_fatal ("receive_packet failed on %s: %m", ip -> name);
!              } else {
! 		 log_error ("receive_packet failed on %s: %m", ip -> name);
! 		 return ISC_R_UNEXPECTED;
!              }
  	}
  	if (result == 0)
  		return ISC_R_UNEXPECTED;
===================================================================

P.

-- 
pir                pir-sig@pir.net                 pir-sig@net.tufts.edu


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?20020518164639.GB15611>