diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2005-08-09 10:20:02 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2005-08-09 10:20:02 +0000 |
commit | 13f4c340aeeeb104844712bb36899d1adef50579 (patch) | |
tree | bb70e59641e2310a3c26ec449af5ab0cb7420d9d /sys/net/if_iso88025subr.c | |
parent | 292ee7be1c404a624dda68ddff1bd988a1851e5a (diff) | |
download | src-13f4c340aeeeb104844712bb36899d1adef50579.tar.gz src-13f4c340aeeeb104844712bb36899d1adef50579.zip |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags. Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags. This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.
Reviewed by: pjd, bz
MFC after: 7 days
Notes
Notes:
svn path=/head/; revision=148887
Diffstat (limited to 'sys/net/if_iso88025subr.c')
-rw-r--r-- | sys/net/if_iso88025subr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c index 6c30564ab811..2170e0e52215 100644 --- a/sys/net/if_iso88025subr.c +++ b/sys/net/if_iso88025subr.c @@ -253,7 +253,8 @@ iso88025_output(ifp, m, dst, rt0) if (ifp->if_flags & IFF_MONITOR) senderr(ENETDOWN); - if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) + if (!((ifp->if_flags & IFF_UP) && + (ifp->if_drv_flags & IFF_DRV_RUNNING))) senderr(ENETDOWN); getmicrotime(&ifp->if_lastchange); @@ -484,7 +485,8 @@ iso88025_input(ifp, m) /* * Discard packet if interface is not up. */ - if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) + if (!((ifp->if_flags & IFF_UP) && + (ifp->if_drv_flags & IFF_DRV_RUNNING))) goto dropanyway; /* |