summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-03-30 12:33:11 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-03-30 12:33:11 +0000
commit1974408e3dabe0dae53f01c5c8871a8bf388fb3d (patch)
tree84fa4cfc9defd669a4d7ded76978742f5804d732 /sys/net
parentab0d591071eed9e4a7e547025fa6585aadeebfaa (diff)
remove support for BIOCGQUEUE and BIOSGQUEUE
nothing uses them, and the implementation make incorrect assumptions about mbufs within bpf processing that could lead to some weird failures. ok sthen@ deraadt@ mpi@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c12
-rw-r--r--sys/net/bpfdesc.h3
2 files changed, 2 insertions, 13 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index cdb1ecbfd63..639f3a4133c 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.136 2016/03/29 10:38:27 dlg Exp $ */
+/* $OpenBSD: bpf.c,v 1.137 2016/03/30 12:33:10 dlg Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -859,14 +859,6 @@ bpfioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
(BPF_DIRECTION_IN|BPF_DIRECTION_OUT);
break;
- case BIOCGQUEUE: /* get queue */
- *(u_int *)addr = d->bd_queue;
- break;
-
- case BIOCSQUEUE: /* set queue */
- d->bd_queue = *(u_int *)addr;
- break;
-
case FIONBIO: /* Non-blocking I/O */
if (*(int *)addr)
d->bd_rtout = -1;
@@ -1245,8 +1237,6 @@ _bpf_mtap(caddr_t arg, struct mbuf *m, u_int direction,
if ((direction & d->bd_dirfilt) != 0)
slen = 0;
- else if (d->bd_queue && m->m_pkthdr.pf.qid != d->bd_queue)
- slen = 0;
else {
struct bpf_program *bf;
struct bpf_insn *fcode = NULL;
diff --git a/sys/net/bpfdesc.h b/sys/net/bpfdesc.h
index ab7c57f5c28..e5c7cea9172 100644
--- a/sys/net/bpfdesc.h
+++ b/sys/net/bpfdesc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpfdesc.h,v 1.29 2015/12/03 16:27:32 mpi Exp $ */
+/* $OpenBSD: bpfdesc.h,v 1.30 2016/03/30 12:33:10 dlg Exp $ */
/* $NetBSD: bpfdesc.h,v 1.11 1995/09/27 18:30:42 thorpej Exp $ */
/*
@@ -80,7 +80,6 @@ struct bpf_d {
u_char bd_locked; /* true if descriptor is locked */
u_char bd_fildrop; /* true if filtered packets will be dropped */
u_char bd_dirfilt; /* direction filter */
- u_int bd_queue; /* the queue the user wants to watch (0 == all) */
int bd_hdrcmplt; /* false to fill in src lladdr automatically */
int bd_async; /* non-zero if packet reception should generate signal */
int bd_sig; /* signal to send upon packet reception */