From owner-freebsd-stable Sat May 18 9:46:44 2002 Delivered-To: freebsd-stable@freebsd.org Received: from moek.pir.net (moek.pir.net [130.64.1.215]) by hub.freebsd.org (Postfix) with ESMTP id 87A6837B401 for ; Sat, 18 May 2002 09:46:40 -0700 (PDT) Received: from pir by moek.pir.net with local (Exim) id 1797Lr-0004R0-00 for stable@FreeBSD.org; Sat, 18 May 2002 12:46:39 -0400 Date: Sat, 18 May 2002 12:46:39 -0400 From: Peter Radcliffe To: stable@FreeBSD.org Subject: Re: BUG: isc-dhcp dhclient infinite loop regression in 4.6-PRE Message-ID: <20020518164639.GB15611@pir.net> Reply-To: stable@freebsd.org Mail-Followup-To: stable@FreeBSD.org References: <200205171157.g4HBvUWs091777@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200205171157.g4HBvUWs091777@hak.lan.Awfulhak.org> User-Agent: Mutt/1.3.27i X-fish: < X-Copy-On-Listmail: Please do NOT Cc: me on list mail. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Brian Somers 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