Date: Wed, 18 Oct 2000 18:55:23 +0000 From: Tony Finch <dot@dotat.at> To: Nick Hibma <n_hibma@qubesoft.com> Cc: Chris Dillon <cdillon@wolves.k12.mo.us>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc usbd.conf Message-ID: <20001018185523.K3582@hand.dotat.at> In-Reply-To: <Pine.BSF.4.20.0010161200410.13415-100000@henny.webweaving.org> References: <Pine.BSF.4.20.0010161155400.13374-100000@henny.webweaving.org> <Pine.BSF.4.20.0010161200410.13415-100000@henny.webweaving.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Nick Hibma <n_hibma@qubesoft.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001018185523.K3582>
