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)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to