As of r1.21 all broadcast packets are reprocessed by ether_input as arriving on

the bridge, this caused these packets to show up twice via bpf. Do not process
them twice with BPF_TAP.

MFC after:	3 days
This commit is contained in:
Andrew Thompson 2005-12-21 09:39:59 +00:00
parent 1adffac42b
commit 1e4200620a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153606

View file

@ -1757,8 +1757,12 @@ bridge_forward(struct bridge_softc *sc, struct mbuf *m)
}
if (dst_if == NULL) {
/* tap off packets passing the bridge */
BPF_MTAP(ifp, m);
/*
* Tap off packets passing the bridge. Broadcast packets will
* already be tapped as they are reinjected into ether_input.
*/
if ((m->m_flags & (M_BCAST|M_MCAST)) == 0)
BPF_MTAP(ifp, m);
bridge_broadcast(sc, src_if, m, 1);
return;