ofproto-dpif: Validate ct_* field masks.
authorJoe Stringer <joestringer@nicira.com>
Wed, 11 Nov 2015 19:39:50 +0000 (11:39 -0800)
committerJoe Stringer <joestringer@nicira.com>
Tue, 1 Dec 2015 23:29:01 +0000 (15:29 -0800)
commit95619d8c3011254a65cdc72d83d0f3638167c264
tree8b2d4f3344a02282564fce1cc9b534d4c9bc395c
parentefba5ae4643c3806dabe4d0dff5494ddb6359b69
ofproto-dpif: Validate ct_* field masks.

When inserting rules that match on connection tracking fields, datapath
support must be checked before allowing or denying the rule insertion.
Previously we only disallowed flows that had non-zero values for the
ct_* field, but allowed non-zero masks. This meant that, eg:

ct_state=-trk,...

Would be allowed, while

ct_state=+trk,...

Would be disallowed, due to lack of datapath support.

Fix this by performing the check on masks instead of the flows.

Reported-by: Ravindra Kenchappa <ravindra.kenchappa@hpe.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
ofproto/ofproto-dpif.c