Skip to content

Commit

Permalink
ofp-actions: Correct test for OFPVID_PRESENT bit in set_field action.
Browse files Browse the repository at this point in the history
Reported-by: Jarno Rajahalme <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed Oct 8, 2014
1 parent 508a933 commit 31c9ed6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ofp-actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1966,8 +1966,8 @@ decode_ofpat_set_field(const struct ofp12_action_set_field *oasf,
* a 1-bit in oxm_value and in oxm_mask." */
if (!mf_is_value_valid(sf->field, &sf->value)
|| (sf->field->id == MFF_VLAN_VID
&& (!(sf->mask.be16 & htons(OFPVID12_PRESENT)
|| !(sf->value.be16 & htons(OFPVID12_PRESENT)))))) {
&& (!(sf->mask.be16 & htons(OFPVID12_PRESENT))
|| !(sf->value.be16 & htons(OFPVID12_PRESENT))))) {
struct ds ds = DS_EMPTY_INITIALIZER;
mf_format(sf->field, &sf->value, NULL, &ds);
VLOG_WARN_RL(&rl, "Invalid value for set field %s: %s",
Expand Down

0 comments on commit 31c9ed6

Please sign in to comment.