Honor the IFF_MONITOR flag.

PR:		kern/99500
Submitted by:	Craig Leres <leres ee.lbl.gov>
Approved by:	re (kensmith)
This commit is contained in:
Gleb Smirnoff 2007-07-26 10:54:33 +00:00
parent 564aab1fe6
commit bb5ba44f82
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171595

View File

@ -234,6 +234,12 @@ ng_eiface_start2(node_p node, hook_p hook, void *arg1, int arg2)
*/
BPF_MTAP(ifp, m);
if (ifp->if_flags & IFF_MONITOR) {
ifp->if_ipackets++;
m_freem(m);
continue;
}
/*
* Send packet; if hook is not connected, mbuf will get
* freed.