summaryrefslogtreecommitdiffstats
path: root/sys/net/if_bridge.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2005-12-21 09:39:59 +0000
committerthompsa <thompsa@FreeBSD.org>2005-12-21 09:39:59 +0000
commit4733958e41f683c6ed960cc437f91fb458f4a579 (patch)
treefbb568d780522dbd7e2c251b442dc42c36caa22e /sys/net/if_bridge.c
parent2c94e273ccc2030ed3a21ecba3b645eda808de8a (diff)
downloadFreeBSD-src-4733958e41f683c6ed960cc437f91fb458f4a579.zip
FreeBSD-src-4733958e41f683c6ed960cc437f91fb458f4a579.tar.gz
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
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r--sys/net/if_bridge.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index fa76cdf..a91adbd 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -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;
OpenPOWER on IntegriCloud