diff options
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r-- | sys/net/bpf.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 707609ad872..b502837083b 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.33 2002/06/06 21:34:16 provos Exp $ */ +/* $OpenBSD: bpf.c,v 1.34 2003/04/01 23:42:24 art Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -1163,13 +1163,6 @@ bpf_catchpacket(d, pkt, pktlen, snaplen, cpfn) bpf_wakeup(d); curlen = 0; } - else if (d->bd_immediate) { - /* - * Immediate mode is set. A packet arrived so any - * reads should be woken up. - */ - bpf_wakeup(d); - } /* * Append the bpf header. @@ -1186,6 +1179,14 @@ bpf_catchpacket(d, pkt, pktlen, snaplen, cpfn) (*cpfn)(pkt, (u_char *)hp + hdrlen, (hp->bh_caplen = totlen - hdrlen)); d->bd_slen = curlen + totlen; + if (d->bd_immediate) { + /* + * Immediate mode is set. A packet arrived so any + * reads should be woken up. + */ + bpf_wakeup(d); + } + if (d->bd_rdStart && (d->bd_rtout + d->bd_rdStart < ticks)) { /* * we could be selecting on the bpf, and we |