diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
commit | 24436414aab60dc84348ec54f23b324b4ae862a3 (patch) | |
tree | ee35283622a78eeac5656cb5661954771faf6520 /sys/arch/vax | |
parent | d1265a1a72755bd0209950654a6df47287781241 (diff) |
allow bpf(4) to ignore packets based on their direction (inbound or
outbound), using a new BIOCSDIRFILT ioctl;
guidance, feedback and ok canacar@
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/bi/if_ni.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/if/if_qe.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/if/sgec.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/qbus/if_de.c | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/sys/arch/vax/bi/if_ni.c b/sys/arch/vax/bi/if_ni.c index 78a9e484713..5dc1aecfec8 100644 --- a/sys/arch/vax/bi/if_ni.c +++ b/sys/arch/vax/bi/if_ni.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ni.c,v 1.7 2006/01/17 20:26:14 miod Exp $ */ +/* $OpenBSD: if_ni.c,v 1.8 2006/03/25 22:41:41 djm Exp $ */ /* $NetBSD: if_ni.c,v 1.15 2002/05/22 16:03:14 wiz Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. @@ -544,7 +544,7 @@ nistart(ifp) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif bdp = &bbd[(data->bufs[0]._index & 0x7fff)]; for (m0 = m, i = 0, mlen = 0; m0; m0 = m0->m_next) { @@ -631,7 +631,7 @@ niintr(void *arg) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); #endif (*ifp->if_input)(ifp, m); break; diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c index 2d43a41c411..37214187496 100644 --- a/sys/arch/vax/if/if_qe.c +++ b/sys/arch/vax/if/if_qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_qe.c,v 1.18 2004/07/07 23:10:45 deraadt Exp $ */ +/* $OpenBSD: if_qe.c,v 1.19 2006/03/25 22:41:42 djm Exp $ */ /* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. @@ -464,7 +464,7 @@ qestart(struct ifnet *ifp) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif /* * m now points to a mbuf chain that can be loaded. @@ -560,7 +560,7 @@ qeintr(void *arg) eh = mtod(m, struct ether_header *); #if NBPFILTER > 0 if (ifp->if_bpf) { - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); if ((ifp->if_flags & IFF_PROMISC) != 0 && bcmp(sc->sc_ac.ac_enaddr, eh->ether_dhost, ETHER_ADDR_LEN) != 0 && diff --git a/sys/arch/vax/if/sgec.c b/sys/arch/vax/if/sgec.c index d7e45c5cad8..e47923cc0fd 100644 --- a/sys/arch/vax/if/sgec.c +++ b/sys/arch/vax/if/sgec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sgec.c,v 1.9 2005/11/24 04:49:25 brad Exp $ */ +/* $OpenBSD: sgec.c,v 1.10 2006/03/25 22:41:42 djm Exp $ */ /* $NetBSD: sgec.c,v 1.5 2000/06/04 02:14:14 matt Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. @@ -343,7 +343,7 @@ zestart(ifp) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif /* * m now points to a mbuf chain that can be loaded. @@ -428,7 +428,7 @@ sgec_intr(sc) eh = mtod(m, struct ether_header *); #if NBPFILTER > 0 if (ifp->if_bpf) { - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); if ((ifp->if_flags & IFF_PROMISC) != 0 && ((eh->ether_dhost[0] & 1) == 0) && bcmp(sc->sc_ac.ac_enaddr, eh->ether_dhost, diff --git a/sys/arch/vax/qbus/if_de.c b/sys/arch/vax/qbus/if_de.c index 24fd2246ec5..c9bad964a39 100644 --- a/sys/arch/vax/qbus/if_de.c +++ b/sys/arch/vax/qbus/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.6 2006/01/17 20:26:16 miod Exp $ */ +/* $OpenBSD: if_de.c,v 1.7 2006/03/25 22:41:42 djm Exp $ */ /* $NetBSD: if_de.c,v 1.11 2001/11/13 07:11:24 lukem Exp $ */ /* @@ -400,7 +400,7 @@ destart(struct ifnet *ifp) panic("deuna xmit in progress"); #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif len = if_ubaput(&sc->sc_ifuba, &sc->sc_ifw[sc->sc_xfree], m); @@ -521,7 +521,7 @@ derecv(struct de_softc *sc) } #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); #endif (*ifp->if_input)(ifp, m); |