]> git.proxmox.com Git - mirror_ovs.git/commit
ofp-parse: Fix match parsing with [x..y]=z format.
authorJarno Rajahalme <jarno@ovn.org>
Mon, 17 Apr 2017 18:37:29 +0000 (11:37 -0700)
committerJarno Rajahalme <jarno@ovn.org>
Mon, 17 Apr 2017 18:37:29 +0000 (11:37 -0700)
commit70bd4e6d9ae62ba4ad0e32132a4e5fd3dc57d359
tree580749f1e75a920af0784d86211129407a50b237
parent773c16d9053fc9cac5ca3e3c4d6cd94ee53d9ad1
ofp-parse: Fix match parsing with [x..y]=z format.

Commit 21b2fa617126 ("ofp-parse: Allow match field names in actions
and brackets in matches.") added support for matching a consecutive
set of bits with the [x..y]=z format, but the copying of the parsed
value ('z') to the match was done from a wrong offset, so that the
actual value matched would be incorrect.

Fix this and add a test case preventing regression in future.

Fixes: 21b2fa617126 ("ofp-parse: Allow match field names in actions and brackets in matches.")
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
lib/ofp-parse.c
tests/ovs-ofctl.at