Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net In bpf_validate(), get rid of bpf_maxbufsize test as...
details: https://anonhg.NetBSD.org/src/rev/19d5e4b1b8e0
branches: trunk
changeset: 586328:19d5e4b1b8e0
user: rpaulo <rpaulo%NetBSD.org@localhost>
date: Tue Dec 13 23:53:49 2005 +0000
description:
In bpf_validate(), get rid of bpf_maxbufsize test as there are other
clients of bpf_filter(), like if_ppp, that are not limited by
bpf_maxbufsize. The same check is done at the run time, so there is no
problem created.
Noticed by Guy Harris in private email.
diffstat:
sys/net/bpf_filter.c | 24 ++----------------------
1 files changed, 2 insertions(+), 22 deletions(-)
diffs (52 lines):
diff -r 305092d9f8a3 -r 19d5e4b1b8e0 sys/net/bpf_filter.c
--- a/sys/net/bpf_filter.c Tue Dec 13 23:27:31 2005 +0000
+++ b/sys/net/bpf_filter.c Tue Dec 13 23:53:49 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bpf_filter.c,v 1.26 2005/12/05 22:38:40 rpaulo Exp $ */
+/* $NetBSD: bpf_filter.c,v 1.27 2005/12/13 23:53:49 rpaulo Exp $ */
/*-
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.26 2005/12/05 22:38:40 rpaulo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.27 2005/12/13 23:53:49 rpaulo Exp $");
#if 0
#if !(defined(lint) || defined(KERNEL))
@@ -46,16 +46,6 @@
#endif
#endif
-#if defined(_KERNEL_OPT)
-#include "bpfilter.h"
-#endif
-
-#if NBPFILTER > 0
-extern int bpf_maxbufsize;
-#else
-#define bpf_maxbufsize BPF_MAXBUFSIZE
-#endif
-
#include <sys/param.h>
#include <sys/time.h>
@@ -507,16 +497,6 @@
case BPF_LD:
case BPF_LDX:
switch (BPF_MODE(p->code)) {
- case BPF_ABS:
- case BPF_IND:
- case BPF_MSH:
- /*
- * More strict check with actual packet length
- * is done runtime.
- */
- if (p->k >= bpf_maxbufsize)
- return 0;
- break;
case BPF_MEM:
if (p->k >= BPF_MEMWORDS)
return 0;
Home |
Main Index |
Thread Index |
Old Index