Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/net Pull up revision 1.60 (requested by thorpej):



details:   https://anonhg.NetBSD.org/src/rev/b13e29f5283b
branches:  netbsd-1-5
changeset: 490495:b13e29f5283b
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Thu Jan 25 16:29:56 2001 +0000

description:
Pull up revision 1.60 (requested by thorpej):
  Fix non-blocking BPF reads. Fixes PR kern/11836.

diffstat:

 sys/net/bpf.c |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r 9cfed8cfd3bf -r b13e29f5283b sys/net/bpf.c
--- a/sys/net/bpf.c     Thu Jan 25 16:22:36 2001 +0000
+++ b/sys/net/bpf.c     Thu Jan 25 16:29:56 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf.c,v 1.57 2000/05/28 18:17:09 jhawk Exp $   */
+/*     $NetBSD: bpf.c,v 1.57.2.1 2001/01/25 16:29:56 jhawk Exp $       */
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -434,8 +434,13 @@
                if (d->bd_rtout != -1)
                        error = tsleep((caddr_t)d, PRINET|PCATCH, "bpf",
                                          d->bd_rtout);
-               else
-                       error = EWOULDBLOCK; /* User requested non-blocking I/O */
+               else {
+                       if (d->bd_rtout == -1) {
+                               /* User requested non-blocking I/O */
+                               error = EWOULDBLOCK;
+                       } else
+                               error = 0;
+               }
                if (error == EINTR || error == ERESTART) {
                        splx(s);
                        return (error);
@@ -1198,9 +1203,8 @@
 }
 
 /*
- * Attach an interface to bpf.  driverp is a pointer to a (struct bpf_if *)
- * in the driver's softc; dlt is the link layer type; hdrlen is the fixed
- * size of the link header (variable length headers not yet supported).
+ * Attach an interface to bpf.  dlt is the link layer type; hdrlen is the
+ * fixed size of the link header (variable length headers not yet supported).
  */
 void
 bpfattach(driverp, ifp, dlt, hdrlen)



Home | Main Index | Thread Index | Old Index