svn commit: r191424 - head/sys/net
Robert Watson
rwatson at FreeBSD.org
Thu Apr 23 15:56:02 UTC 2009
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)
More information about the svn-src-head
mailing list