diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-04-23 15:56:01 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-04-23 15:56:01 +0000 |
commit | 00b3a1fd4fa72661f985945a23f97c9762c257b6 (patch) | |
tree | 73d4030dfceae7dd50ce566066416539a8e946d6 /sys/net/if.c | |
parent | 471539dc8f7f8952bce906c2f71708c614007fcb (diff) | |
download | FreeBSD-src-00b3a1fd4fa72661f985945a23f97c9762c257b6.zip FreeBSD-src-00b3a1fd4fa72661f985945a23f97c9762c257b6.tar.gz |
As with ifnet_byindex_ref(), don't return IFF_DYING interfaces from
ifunit_ref(). ifunit() continues to return them.
MFC after: 3 weeks
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 991f880..5c2e224 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -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) |