From owner-svn-src-all@FreeBSD.ORG Thu Apr 23 15:56:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD6EC1065670; Thu, 23 Apr 2009 15:56:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBFD08FC32; Thu, 23 Apr 2009 15:56:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3NFu12l091273; Thu, 23 Apr 2009 15:56:01 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3NFu1Mm091272; Thu, 23 Apr 2009 15:56:01 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200904231556.n3NFu1Mm091272@svn.freebsd.org> From: Robert Watson Date: Thu, 23 Apr 2009 15:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191424 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2009 15:56:02 -0000 Author: rwatson Date: Thu Apr 23 15:56:01 2009 New Revision: 191424 URL: http://svn.freebsd.org/changeset/base/191424 Log: As with ifnet_byindex_ref(), don't return IFF_DYING interfaces from ifunit_ref(). ifunit() continues to return them. MFC after: 3 weeks Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Thu Apr 23 13:08:47 2009 (r191423) +++ head/sys/net/if.c Thu Apr 23 15:56:01 2009 (r191424) @@ -1799,7 +1799,8 @@ ifunit_ref(const char *name) IFNET_RLOCK(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if (strncmp(name, ifp->if_xname, IFNAMSIZ) == 0) + if (strncmp(name, ifp->if_xname, IFNAMSIZ) == 0 && + !(ifp->if_flags & IFF_DYING)) break; } if (ifp != NULL)