svn commit: r186365 - in stable/6/sys: . net

Andrew Thompson thompsa at FreeBSD.org
Sat Dec 20 22:11:32 UTC 2008


Author: thompsa
Date: Sat Dec 20 22:11:31 2008
New Revision: 186365
URL: http://svn.freebsd.org/changeset/base/186365

Log:
  MFC r172824
  
   Use ETHER_BPF_MTAP so that the vlan tags are visible to bpf(4) when bridging a
   vlan trunk.

Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/net/if_bridge.c

Modified: stable/6/sys/net/if_bridge.c
==============================================================================
--- stable/6/sys/net/if_bridge.c	Sat Dec 20 19:45:22 2008	(r186364)
+++ stable/6/sys/net/if_bridge.c	Sat Dec 20 22:11:31 2008	(r186365)
@@ -1867,7 +1867,7 @@ bridge_start(struct ifnet *ifp)
 		IFQ_DEQUEUE(&ifp->if_snd, m);
 		if (m == 0)
 			break;
-		BPF_MTAP(ifp, m);
+		ETHER_BPF_MTAP(ifp, m);
 
 		eh = mtod(m, struct ether_header *);
 		dst_if = NULL;
@@ -1977,7 +1977,7 @@ bridge_forward(struct bridge_softc *sc, 
 	 * firewall issues on the bridge.
 	 */
 	if (dst_if != NULL || (m->m_flags & (M_BCAST | M_MCAST)) == 0)
-		BPF_MTAP(ifp, m);
+		ETHER_BPF_MTAP(ifp, m);
 
 	/* run the packet filter */
 	if (inet_pfil_hook.ph_busy_count >= 0
@@ -2067,7 +2067,7 @@ bridge_input(struct ifnet *ifp, struct m
 	 */
 	if ((bifp->if_flags & IFF_MONITOR) != 0) {
 		m->m_pkthdr.rcvif  = bifp;
-		BPF_MTAP(bifp, m);
+		ETHER_BPF_MTAP(bifp, m);
 		bifp->if_ipackets++;
 		bifp->if_ibytes += m->m_pkthdr.len;
 		m_freem(m);
@@ -2177,7 +2177,7 @@ bridge_input(struct ifnet *ifp, struct m
 	    OR_CARP_CHECK_WE_ARE_DST((iface))				\
 	    ) {								\
 		if ((iface)->if_type == IFT_BRIDGE) {			\
-			BPF_MTAP(iface, m);				\
+			ETHER_BPF_MTAP(iface, m);			\
 			iface->if_ipackets++;				\
 			/* Filter on the physical interface. */		\
 			if (pfil_local_phys &&				\


More information about the svn-src-all mailing list