Support monitor mode where the frame is discarded after bpf and stats processing.

This commit is contained in:
thompsa 2007-12-05 00:42:28 +00:00
parent bc73f21841
commit a3cd956d35

View File

@ -1155,6 +1155,11 @@ lagg_input(struct ifnet *ifp, struct mbuf *m)
if (m != NULL) { if (m != NULL) {
scifp->if_ipackets++; scifp->if_ipackets++;
scifp->if_ibytes += m->m_pkthdr.len; scifp->if_ibytes += m->m_pkthdr.len;
if (scifp->if_flags & IFF_MONITOR) {
m_freem(m);
m = NULL;
}
} }
LAGG_RUNLOCK(sc); LAGG_RUNLOCK(sc);