ofproto-dpif: Reject partial ct_labels if unsupported.
authorJoe Stringer <joestringer@nicira.com>
Wed, 11 Nov 2015 19:39:49 +0000 (11:39 -0800)
committerJoe Stringer <joestringer@nicira.com>
Tue, 1 Dec 2015 23:29:00 +0000 (15:29 -0800)
commitefba5ae4643c3806dabe4d0dff5494ddb6359b69
tree9f986d592a6d1e802c4164135293257bb8a02674
parente496a484cf53f29f3bf663d2d18a4cd22ea761ea
ofproto-dpif: Reject partial ct_labels if unsupported.

If only half of a ct_label is present in a miniflow/minimask (eg, only
matching on one specific bit), then rule_check() would allow the flow
even if ct_label was unsupported, because it required both 64-bit fields
that comprise the ct_label to be present in the miniflow before
performing the check.

Fix this by populating the stack copy of the label directly from the
miniflow fields if available (or zero each 64-bit word if unavailable).

Suggested-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
lib/flow.h
ofproto/ofproto-dpif.c