From owner-freebsd-current@FreeBSD.ORG Sat Aug 9 13:29:38 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D670737B401 for ; Sat, 9 Aug 2003 13:29:38 -0700 (PDT) Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADB4943FB1 for ; Sat, 9 Aug 2003 13:29:37 -0700 (PDT) (envelope-from mb@imp.ch) Received: from nbs.imp.ch (nbs.imp.ch [157.161.4.7]) by mail.imp.ch (8.12.6p2/8.12.3) with ESMTP id h79KTZYc041757 for ; Sat, 9 Aug 2003 22:29:35 +0200 (CEST) (envelope-from Martin.Blapp@imp.ch) Received: from cvs.imp.ch (cvs.imp.ch [157.161.4.9]) by nbs.imp.ch (8.12.8/8.12.3) with ESMTP id h79KTZlH8859404 for ; Sat, 9 Aug 2003 22:29:35 +0200 (MES) Date: Sat, 9 Aug 2003 22:29:35 +0200 (CEST) From: Martin Blapp To: current@freebsd.org Message-ID: <20030809222920.A89102@cvs.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: dhclient problem with xl0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2003 20:29:39 -0000 Argl, of course the patch was wrong. Ok, this should work now ... --- contrib/isc-dhcp/client/dhclient.c.orig Thu Aug 7 16:58:46 2003 +++ contrib/isc-dhcp/client/dhclient.c Sat Aug 9 21:47:14 2003 @@ -3288,19 +3288,24 @@ return (HAVELINK); } } + /* + * If dhclient.conf contains media settings, we cannot + * abort if the interface is not set to active mode. + */ + if (ip -> havemedia && ip -> client -> state != S_BOUND) + return (HAVELINK); + } else { + /* + * IFM_AVALID is not set. We cannot check + * the link state. Assume HAVELINK. + */ + return (HAVELINK); } - - /* - * If dhclient.conf contains media settings, we cannot - * abort if the interface is not set to active mode. - */ - if (ip -> havemedia && ip -> client -> state != S_BOUND) - return (HAVELINK); - /* * We really have no link. */ return (NOLINK); + #else /* ifdef __FreeBSD__ */ /*