git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df85c52
)
lib/odp-util: Only use expected_bit when set.
author
Jarno Rajahalme
<jrajahalme@nicira.com>
Fri, 6 Dec 2013 16:30:17 +0000
(08:30 -0800)
committer
Jarno Rajahalme
<jrajahalme@nicira.com>
Fri, 6 Dec 2013 16:30:17 +0000
(08:30 -0800)
parse_l2_5_onward() previously used out of range 'expected_bit' when
it was called with no attrs, which happens when parsing a mask with
zero length.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/odp-util.c
patch
|
blob
|
history
diff --git
a/lib/odp-util.c
b/lib/odp-util.c
index
0fd1c51
..
6dbc213
100644
(file)
--- a/
lib/odp-util.c
+++ b/
lib/odp-util.c
@@
-2871,7
+2871,7
@@
parse_l2_5_onward(const struct nlattr *attrs[OVS_KEY_ATTR_MAX + 1],
} else {
goto done;
}
- if (
is_mask) {
+ if (
check_len > 0) { /* Happens only when 'is_mask'. */
if (!is_all_zeros(check_start, check_len) &&
flow->dl_type != htons(0xffff)) {
return ODP_FIT_ERROR;