summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2013-11-29 19:28:56 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2013-11-29 19:28:56 +0000
commit5305d14fdc4b1465a852872d7b7c67d45edbd55f (patch)
treed244044b7529bd501f78169b3a196deec1285cfa /sys
parentf7766099ff0521f3ae036e3d6683659883737d4c (diff)
panics still being reported. send bpf.c back to 1.85
Diffstat (limited to 'sys')
-rw-r--r--sys/net/bpf.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index a08af5bd239..0c84f978184 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.88 2013/11/17 08:58:35 dlg Exp $ */
+/* $OpenBSD: bpf.c,v 1.89 2013/11/29 19:28:55 tedu Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -1422,16 +1422,17 @@ bpf_catchpacket(struct bpf_d *d, u_char *pkt, size_t pktlen, size_t snaplen,
bpf_wakeup(d);
}
- if (d->bd_fbuf && d->bd_rdStart &&
- (ticks - (d->bd_rtout + d->bd_rdStart) > 0)) {
+ if (d->bd_rdStart && (d->bd_rtout + d->bd_rdStart < ticks)) {
/*
* we could be selecting on the bpf, and we
* may have timeouts set. We got here by getting
* a packet, so wake up the reader.
*/
- d->bd_rdStart = 0;
- ROTATE_BUFFERS(d);
- bpf_wakeup(d);
+ if (d->bd_fbuf) {
+ d->bd_rdStart = 0;
+ ROTATE_BUFFERS(d);
+ bpf_wakeup(d);
+ }
}
}