OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
CVS: cvs.openbsd.org: src

From: Artur Grabowski (artcvs.openbsd.org)
Date: Tue Apr 01 2003 - 17:42:24 CST


CVSROOT: /cvs
Module name: src
Changes by: artcvs.openbsd.org 2003/04/01 16:42:24

Modified files:
        sys/net : bpf.c

Log message:
When using bpf(4) in immediate mode, and using kevent(2) to receive
notification of packet arrival, the usermode application isn't notified
until a second packet arrives.

This is because KNOTE() calls filt_bpfread() before bd_slen has been
updated with the newly arrived packet length, so it looks like there
is no data there.

Moving the bpf_wakeup() call for immediate mode to after bd_slen is set
fixes it.

From: wayneepipe.com.au in pr 3175