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/dev/usb/if_url.c | |
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/dev/usb/if_url.c')
-rw-r--r-- | sys/dev/usb/if_url.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index 02aa5d4bebe..19a22eef9a4 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_url.c,v 1.30 2006/03/07 04:41:19 krw Exp $ */ +/* $OpenBSD: if_url.c,v 1.31 2006/03/25 22:41:47 djm Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -71,7 +71,6 @@ #if NBPFILTER > 0 #include <net/bpf.h> #endif -#define BPF_MTAP(ifp, m) bpf_mtap((ifp)->if_bpf, (m)) #if defined(__NetBSD__) #include <net/if_ether.h> @@ -904,7 +903,7 @@ url_start(struct ifnet *ifp) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m_head); + bpf_mtap(ifp->if_bpf, m_head, BPF_DIRECTION_OUT); #endif ifp->if_flags |= IFF_OACTIVE; @@ -1080,7 +1079,7 @@ url_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) #if NBPFILTER > 0 if (ifp->if_bpf) - BPF_MTAP(ifp, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); #endif DPRINTF(("%s: %s: deliver %d\n", USBDEVNAME(sc->sc_dev), |