Module Name:    src
Committed By:   martin
Date:           Fri Aug  4 14:57:52 UTC 2023

Modified Files:
        src/sys/net [netbsd-9]: bpf.c

Log Message:
Apply patch, requested by ozaki-r in ticket #1708:

        sys/net/bpf.c                   (apply patch)

bpf: allow to read with no filter (regressed at revision 1.213,
fixed differently in -current)


To generate a diff of this commit:
cvs rdiff -u -r1.229.2.2 -r1.229.2.3 src/sys/net/bpf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/bpf.c
diff -u src/sys/net/bpf.c:1.229.2.2 src/sys/net/bpf.c:1.229.2.3
--- src/sys/net/bpf.c:1.229.2.2	Wed Feb 22 19:50:33 2023
+++ src/sys/net/bpf.c	Fri Aug  4 14:57:52 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.229.2.2 2023/02/22 19:50:33 martin Exp $	*/
+/*	$NetBSD: bpf.c,v 1.229.2.3 2023/08/04 14:57:52 martin Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.229.2.2 2023/02/22 19:50:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.229.2.3 2023/08/04 14:57:52 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -1628,6 +1628,8 @@ bpf_deliver(struct bpf_if *bp, void *(*c
 			else
 				slen = bpf_filter_ext(NULL, filter->bf_insn,
 				    &args);
+		} else {
+			slen = (u_int)-1; /* No filter means accept all */
 		}
 
 		if (!slen) {

Reply via email to