2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

ofp-actions: Correct test for OFPVID_PRESENT bit in set_field action.

Reported-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2014-10-08 16:19:57 -07:00
parent 508a933809
commit 31c9ed6c6f

View File

@@ -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",