Fix exiting an epoch(9) we never entered. May happen only with MAC.
This commit is contained in:
parent
bbf3607b86
commit
0a27163f8d
@ -272,6 +272,7 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m)
|
||||
uint8_t proto, ecn;
|
||||
int error;
|
||||
|
||||
GIF_RLOCK();
|
||||
#ifdef MAC
|
||||
error = mac_ifnet_check_transmit(ifp, m);
|
||||
if (error) {
|
||||
@ -280,7 +281,6 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m)
|
||||
}
|
||||
#endif
|
||||
error = ENETDOWN;
|
||||
GIF_RLOCK();
|
||||
sc = ifp->if_softc;
|
||||
if ((ifp->if_flags & IFF_MONITOR) != 0 ||
|
||||
(ifp->if_flags & IFF_UP) == 0 ||
|
||||
|
@ -550,6 +550,7 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m)
|
||||
uint16_t proto;
|
||||
|
||||
len = 0;
|
||||
GRE_RLOCK();
|
||||
#ifdef MAC
|
||||
error = mac_ifnet_check_transmit(ifp, m);
|
||||
if (error) {
|
||||
@ -558,7 +559,6 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m)
|
||||
}
|
||||
#endif
|
||||
error = ENETDOWN;
|
||||
GRE_RLOCK();
|
||||
sc = ifp->if_softc;
|
||||
if ((ifp->if_flags & IFF_MONITOR) != 0 ||
|
||||
(ifp->if_flags & IFF_UP) == 0 ||
|
||||
|
@ -479,13 +479,13 @@ me_transmit(struct ifnet *ifp, struct mbuf *m)
|
||||
uint32_t af;
|
||||
int error, hlen, plen;
|
||||
|
||||
ME_RLOCK();
|
||||
#ifdef MAC
|
||||
error = mac_ifnet_check_transmit(ifp, m);
|
||||
if (error != 0)
|
||||
goto drop;
|
||||
#endif
|
||||
error = ENETDOWN;
|
||||
ME_RLOCK();
|
||||
sc = ifp->if_softc;
|
||||
if (sc == NULL || !ME_READY(sc) ||
|
||||
(ifp->if_flags & IFF_MONITOR) != 0 ||
|
||||
|
Loading…
Reference in New Issue
Block a user