summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorCan Erkin Acar <canacar@cvs.openbsd.org>2008-01-02 00:31:51 +0000
committerCan Erkin Acar <canacar@cvs.openbsd.org>2008-01-02 00:31:51 +0000
commita65cfe9a54b051b741d12e62c3cd38f30688c5a4 (patch)
tree8fc877eb233834ac2afbc2a258bdf5bebd44d183 /sys/net
parentf8b492adfa069469edf1474697c4c71e1a4961dd (diff)
Accept BPF_MUL as a valid instruction in bpf_validate() also improve
the comments. Based on diff from Guy Harris
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf_filter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/bpf_filter.c b/sys/net/bpf_filter.c
index 20e5e01444a..79cf51f1ded 100644
--- a/sys/net/bpf_filter.c
+++ b/sys/net/bpf_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf_filter.c,v 1.19 2007/08/06 08:28:09 tom Exp $ */
+/* $OpenBSD: bpf_filter.c,v 1.20 2008/01/02 00:31:50 canacar Exp $ */
/* $NetBSD: bpf_filter.c,v 1.12 1996/02/13 22:00:00 christos Exp $ */
/*
@@ -473,9 +473,8 @@ bpf_filter(pc, p, wirelen, buflen)
/*
* Return true if the 'fcode' is a valid filter program.
* The constraints are that each jump be forward and to a valid
- * code. The code must terminate with either an accept or reject.
- * 'valid' is an array for use by the routine (it must be at least
- * 'len' bytes long).
+ * code and memory operations use valid addresses. The code
+ * must terminate with either an accept or reject.
*
* The kernel needs to be able to verify an application's filter code.
* Otherwise, a bogus program could easily crash the system.
@@ -531,6 +530,7 @@ bpf_validate(f, len)
switch (BPF_OP(p->code)) {
case BPF_ADD:
case BPF_SUB:
+ case BPF_MUL:
case BPF_OR:
case BPF_AND:
case BPF_LSH: