mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Grab the rlock before checking if our interface is enabled, it could be
possible to hit a dead pointer when changing interfaces. PR: kern/156978 Submitted by: Andrew Boyer MFC after: 1 week
This commit is contained in:
parent
0136244a52
commit
6069a2c0bd
1 changed files with 2 additions and 1 deletions
|
|
@ -1221,14 +1221,15 @@ lagg_input(struct ifnet *ifp, struct mbuf *m)
|
|||
struct lagg_softc *sc = lp->lp_softc;
|
||||
struct ifnet *scifp = sc->sc_ifp;
|
||||
|
||||
LAGG_RLOCK(sc);
|
||||
if ((scifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ||
|
||||
(lp->lp_flags & LAGG_PORT_DISABLED) ||
|
||||
sc->sc_proto == LAGG_PROTO_NONE) {
|
||||
LAGG_RUNLOCK(sc);
|
||||
m_freem(m);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
LAGG_RLOCK(sc);
|
||||
ETHER_BPF_MTAP(scifp, m);
|
||||
|
||||
m = (*sc->sc_input)(sc, lp, m);
|
||||
|
|
|
|||
Loading…
Reference in a new issue