aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-04-21 02:20:48 -0700
committerGuy Harris <guy@alum.mit.edu>2010-04-21 02:20:48 -0700
commitace1a2c86f54529dac7f3db51c2d914826126fff (patch)
treea1e93e27f312704ab728ce26894b5a5e793868fa
parente25ea10a1327ba928d5fcaa4b28adbe6802e6d4d (diff)
Fix check for a constant 0 argument to BPF_DIV.
BPV_RVAL() is the macro to check the type of the return value of a "ret" instruction; it tests more bits than are appropriate for a "div" instruction, and the test fails.
-rw-r--r--bpf/net/bpf_filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bpf/net/bpf_filter.c b/bpf/net/bpf_filter.c
index a51ed78..22aff79 100644
--- a/bpf/net/bpf_filter.c
+++ b/bpf/net/bpf_filter.c
@@ -608,7 +608,7 @@ bpf_validate(f, len)
/*
* Check for constant division by 0.
*/
- if (BPF_RVAL(p->code) == BPF_K && p->k == 0)
+ if (BPF_SRC(p->code) == BPF_K && p->k == 0)
return 0;
break;
default: