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 <[email protected]> --- lib/odp-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 0fd1c51..6dbc213 100644 --- 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; -- 1.7.10.4 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
