add missed calls to bpf_peers_present

This commit is contained in:
Sam Leffler 2006-06-02 23:14:40 +00:00
parent b1e30c4c4e
commit ff046a6c6b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159183
11 changed files with 15 additions and 17 deletions

View File

@ -3635,7 +3635,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf
ieee80211_dump_pkt(mtod(m0, caddr_t), m0->m_len,
sc->sc_hwmap[txrate].ieeerate, -1);
if (ic->ic_rawbpf)
if (bpf_peers_present(ic->ic_rawbpf))
bpf_mtap(ic->ic_rawbpf, m0);
if (bpf_peers_present(sc->sc_drvbpf)) {
u_int64_t tsf = ath_hal_gettsf64(ah);

View File

@ -796,8 +796,7 @@ awi_start(struct ifnet *ifp)
}
IFQ_DEQUEUE(&ifp->if_snd, m0);
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m0);
BPF_MTAP(ifp, m0);
#endif
if ((ifp->if_flags & IFF_LINK0) || sc->sc_adhoc_ap)
m0 = awi_ether_encap(sc, m0);
@ -839,7 +838,7 @@ awi_start(struct ifnet *ifp)
ifp->if_opackets++;
}
#if NBPFILTER > 0
if (ic->ic_rawbpf)
if (bpf_peers_present(ic->ic_rawbpf))
bpf_mtap(ic->ic_rawbpf, m0);
#endif
if (dowep) {

View File

@ -1205,8 +1205,7 @@ gem_start_locked(ifp)
bus_space_write_4(sc->sc_bustag, sc->sc_h, GEM_TX_KICK,
sc->sc_txnext);
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m0);
BPF_MTAP(ifp, m0);
} while (1);
if (txmfail == -1 || sc->sc_txfree == 0) {

View File

@ -1495,7 +1495,7 @@ ipw_start(struct ifnet *ifp)
continue;
}
if (ic->ic_rawbpf != NULL)
if (bpf_peers_present(ic->ic_rawbpf))
bpf_mtap(ic->ic_rawbpf, m0);
if (ipw_tx_start(ifp, m0, ni) != 0) {

View File

@ -1984,7 +1984,7 @@ iwi_start(struct ifnet *ifp)
continue;
}
if (ic->ic_rawbpf != NULL)
if (bpf_peers_present(ic->ic_rawbpf))
bpf_mtap(ic->ic_rawbpf, m0);
if (iwi_tx_start(ifp, m0, ni, ac) != 0) {

View File

@ -1242,7 +1242,7 @@ struct softc
# define DMA_LOAD(map, addr, size) bus_dmamap_load(ring->tag, map, addr, size, fbsd_dmamap_load, ring, 0)
# if (NBPFILTER != 0)
# if (__FreeBSD_version >= 500000)
# define LMC_BPF_MTAP(mbuf) if (sc->ifp->if_bpf) bpf_mtap(sc->ifp->if_bpf, mbuf)
# define LMC_BPF_MTAP(mbuf) BPF_MTAP(sc->ifp, mbuf)
# else /* FreeBSD-4 */
# define LMC_BPF_MTAP(mbuf) if (sc->ifp->if_bpf) bpf_mtap(sc->ifp, mbuf)
# endif

View File

@ -1782,7 +1782,7 @@ rt2661_start(struct ifnet *ifp)
ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif;
m0->m_pkthdr.rcvif = NULL;
if (ic->ic_rawbpf != NULL)
if (bpf_peers_present(ic->ic_rawbpf))
bpf_mtap(ic->ic_rawbpf, m0);
if (rt2661_tx_mgt(sc, m0, ni) != 0)
@ -1836,7 +1836,7 @@ rt2661_start(struct ifnet *ifp)
continue;
}
if (ic->ic_rawbpf != NULL)
if (bpf_peers_present(ic->ic_rawbpf))
bpf_mtap(ic->ic_rawbpf, m0);
if (rt2661_tx_data(sc, m0, ni, ac) != 0) {

View File

@ -1355,7 +1355,7 @@ ural_start(struct ifnet *ifp)
ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif;
m0->m_pkthdr.rcvif = NULL;
if (ic->ic_rawbpf != NULL)
if (bpf_peers_present(ic->ic_rawbpf))
bpf_mtap(ic->ic_rawbpf, m0);
if (ural_tx_mgt(sc, m0, ni) != 0)
@ -1391,7 +1391,7 @@ ural_start(struct ifnet *ifp)
continue;
}
if (ic->ic_rawbpf != NULL)
if (bpf_peers_present(ic->ic_rawbpf))
bpf_mtap(ic->ic_rawbpf, m0);
if (ural_tx_data(sc, m0, ni) != 0) {

View File

@ -204,7 +204,7 @@ faithoutput(ifp, m, dst, rt)
dst->sa_family = af;
}
if (ifp->if_bpf) {
if (bpf_peers_present(ifp->if_bpf)) {
af = dst->sa_family;
bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m);
}

View File

@ -190,7 +190,7 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
/*
* Let BPF tap off a copy before we encapsulate.
*/
if (ifp->if_bpf) {
if (bpf_peers_present(ifp->if_bpf)) {
struct fw_bpfhdr h;
if (unicast)
bcopy(destfw, h.firewire_dhost, 8);
@ -565,7 +565,7 @@ firewire_input(struct ifnet *ifp, struct mbuf *m, uint16_t src)
* Give bpf a chance at the packet. The link-level driver
* should have left us a tag with the EUID of the sender.
*/
if (ifp->if_bpf) {
if (bpf_peers_present(ifp->if_bpf)) {
struct fw_bpfhdr h;
struct m_tag *mtag;

View File

@ -418,7 +418,7 @@ static void
ng_iface_bpftap(struct ifnet *ifp, struct mbuf *m, sa_family_t family)
{
KASSERT(family != AF_UNSPEC, ("%s: family=AF_UNSPEC", __func__));
if (ifp->if_bpf != NULL) {
if (bpf_peers_present(ifp->if_bpf)) {
int32_t family4 = (int32_t)family;
bpf_mtap2(ifp->if_bpf, &family4, sizeof(family4), m);
}