From owner-cvs-all Wed Oct 18 11:56: 2 2000 Delivered-To: cvs-all@freebsd.org Received: from hand.dotat.at (sfo-gw.covalent.net [207.44.198.62]) by hub.freebsd.org (Postfix) with ESMTP id 3AAF237B4F9; Wed, 18 Oct 2000 11:55:56 -0700 (PDT) Received: from fanf by hand.dotat.at with local (Exim 3.15 #3) id 13lyN1-0002lK-00; Wed, 18 Oct 2000 18:55:23 +0000 Date: Wed, 18 Oct 2000 18:55:23 +0000 From: Tony Finch To: Nick Hibma Cc: Chris Dillon , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc usbd.conf Message-ID: <20001018185523.K3582@hand.dotat.at> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: Organization: Covalent Technologies, Inc Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Nick Hibma wrote: > >The proper solution would be the make dhclient aware of interfaces that >disappear. Once the interface has disappeared it should terminate. I currently use this hack which is *not* the right solution :-) Tony. -- en oeccget g mtcaa f.a.n.finch v spdlkishrhtewe y dot@dotat.at eatp o v eiti i d. fanf@covalent.net Index: common/dispatch.c =================================================================== RCS file: /home/ncvs/src/contrib/isc-dhcp/common/dispatch.c,v retrieving revision 1.1.1.4.2.1 diff -u -r1.1.1.4.2.1 dispatch.c --- common/dispatch.c 2000/06/26 23:07:20 1.1.1.4.2.1 +++ common/dispatch.c 2000/08/17 22:51:28 @@ -701,7 +701,12 @@ if ((result = receive_packet (ip, u.packbuf, sizeof u, &from, &hfrom)) < 0) { - warn ("receive_packet failed on %s: %m", ip -> name); + ip -> failures += 1; + if (ip -> failures > 100) + error ("receive_packet failed on %s: %m -- giving up", + ip -> name); + else + warn ("receive_packet failed on %s: %m", ip -> name); return; } if (result == 0) Index: includes/dhcpd.h =================================================================== RCS file: /home/ncvs/src/contrib/isc-dhcp/includes/dhcpd.h,v retrieving revision 1.1.1.4.2.2 diff -u -r1.1.1.4.2.2 dhcpd.h --- includes/dhcpd.h 2000/07/20 10:26:14 1.1.1.4.2.2 +++ includes/dhcpd.h 2000/08/17 22:43:27 @@ -383,6 +383,8 @@ #define INTERFACE_REQUESTED 1 #define INTERFACE_AUTOMATIC 2 + int failures; /* Too many of these and we bomb */ + /* Only used by DHCP client code. */ struct client_state *client; }; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message