diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 9387a8ca1a52..8603c1762822 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.94 2004/04/15 14:56:57 darrenr Exp $ */ +/* $NetBSD: bpf.c,v 1.95 2004/04/20 10:51:09 darrenr Exp $ */ /* * Copyright (c) 1990, 1991, 1993 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.94 2004/04/15 14:56:57 darrenr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.95 2004/04/20 10:51:09 darrenr Exp $"); #include "bpfilter.h" @@ -1102,7 +1102,10 @@ bpfpoll(dev, events, p) (d->bd_immediate && d->bd_slen != 0)) { revents |= events & (POLLIN | POLLRDNORM); } else if (d->bd_state == BPF_TIMED_OUT) { - revents |= events & POLLIN; + if (d->bd_slen != 0) + revents |= events & (POLLIN | POLLRDNORM); + else + revents |= events & POLLIN; } else { selrecord(p, &d->bd_sel); /* Start the read timeout if necessary */