diff options
author | thompsa <thompsa@FreeBSD.org> | 2007-10-20 02:10:10 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2007-10-20 02:10:10 +0000 |
commit | 2339e3f7a601c7eec964dca1242802b275b2d7d8 (patch) | |
tree | a33d23b91d852efae1fc1bdc4d4e41ebf3225772 /sys/net/if_bridge.c | |
parent | 5ffde2e5b3c975bb9ad1cb7feee755370241e0d3 (diff) | |
download | FreeBSD-src-2339e3f7a601c7eec964dca1242802b275b2d7d8.zip FreeBSD-src-2339e3f7a601c7eec964dca1242802b275b2d7d8.tar.gz |
Use ETHER_BPF_MTAP so that the vlan tags are visible to bpf(4) when bridging a
vlan trunk.
Discussed with: csjp
MFC after: 3 days
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r-- | sys/net/if_bridge.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index f29063d..fb18c84 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -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; @@ -1975,7 +1975,7 @@ bridge_forward(struct bridge_softc *sc, struct bridge_iflist *sbif, * 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 (PFIL_HOOKED(&inet_pfil_hook) @@ -2073,7 +2073,7 @@ bridge_input(struct ifnet *ifp, struct mbuf *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); @@ -2118,7 +2118,7 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) /* Mark the packet as arriving on the bridge interface */ m->m_pkthdr.rcvif = bifp; - BPF_MTAP(bifp, m); + ETHER_BPF_MTAP(bifp, m); bifp->if_ipackets++; BRIDGE_UNLOCK(sc); |