From 31c9ed6c6fa220106472c46e652f4af29ad47d9a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 8 Oct 2014 16:19:57 -0700 Subject: [PATCH] ofp-actions: Correct test for OFPVID_PRESENT bit in set_field action. Reported-by: Jarno Rajahalme Signed-off-by: Ben Pfaff --- lib/ofp-actions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index de46e083e..f5169ff46 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -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",