From: Antonio Huete Jimenez Date: Thu, 2 Aug 2012 18:15:28 +0000 (+0200) Subject: dhclient - Make sure an interface is registered before we start using it. X-Git-Tag: v3.2.0~337 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/d19bab2e415eb6d9787597eff213229a253a7cbb?ds=sidebyside dhclient - Make sure an interface is registered before we start using it. Taken-from: OpenBSD --- diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 3c021b42ae..7968d24208 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: src/sbin/dhclient/dispatch.c,v 1.47 2010/07/02 22:03:27 deraadt Exp $ */ +/* $OpenBSD: src/sbin/dhclient/dispatch.c,v 1.49 2010/10/23 14:26:57 phessler Exp $ */ /* * Copyright 2004 Henning Brauer @@ -132,6 +132,9 @@ dispatch(void) * a timeout registered, time out the select call then. */ another: + if (!ifi) + error("No interfaces available"); + if (!ifi->linkstat) interfaces_invalidated = 0;