mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +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:
@@ -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." */
|
* a 1-bit in oxm_value and in oxm_mask." */
|
||||||
if (!mf_is_value_valid(sf->field, &sf->value)
|
if (!mf_is_value_valid(sf->field, &sf->value)
|
||||||
|| (sf->field->id == MFF_VLAN_VID
|
|| (sf->field->id == MFF_VLAN_VID
|
||||||
&& (!(sf->mask.be16 & htons(OFPVID12_PRESENT)
|
&& (!(sf->mask.be16 & htons(OFPVID12_PRESENT))
|
||||||
|| !(sf->value.be16 & htons(OFPVID12_PRESENT)))))) {
|
|| !(sf->value.be16 & htons(OFPVID12_PRESENT))))) {
|
||||||
struct ds ds = DS_EMPTY_INITIALIZER;
|
struct ds ds = DS_EMPTY_INITIALIZER;
|
||||||
mf_format(sf->field, &sf->value, NULL, &ds);
|
mf_format(sf->field, &sf->value, NULL, &ds);
|
||||||
VLOG_WARN_RL(&rl, "Invalid value for set field %s: %s",
|
VLOG_WARN_RL(&rl, "Invalid value for set field %s: %s",
|
||||||
|
|||||||
Reference in New Issue
Block a user