Module Name: src Committed By: martin Date: Fri Aug 4 15:00:28 UTC 2023
Modified Files: src/sys/net [netbsd-8]: bpf.c Log Message: Apply patch, requested by ozaki-r in ticket #1885: 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.216.6.8 -r1.216.6.9 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.216.6.8 src/sys/net/bpf.c:1.216.6.9 --- src/sys/net/bpf.c:1.216.6.8 Wed Feb 22 19:51:47 2023 +++ src/sys/net/bpf.c Fri Aug 4 15:00:28 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.216.6.8 2023/02/22 19:51:47 martin Exp $ */ +/* $NetBSD: bpf.c,v 1.216.6.9 2023/08/04 15:00:28 martin Exp $ */ /* * Copyright (c) 1990, 1991, 1993 @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.216.6.8 2023/02/22 19:51:47 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.216.6.9 2023/08/04 15:00:28 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_bpf.h" @@ -1605,6 +1605,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) {