Date: Thu, 23 Apr 2009 15:56:01 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r191424 - head/sys/net Message-ID: <200904231556.n3NFu1Mm091272@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904231556.n3NFu1Mm091272>