ovs-ofctl: Encode cookies in OXM-compliant manner.
authorBen Pfaff <blp@nicira.com>
Fri, 5 Sep 2014 00:02:35 +0000 (17:02 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 7 Oct 2014 22:34:36 +0000 (15:34 -0700)
commitba5cc068c8e295453e8ccb9cf223045d5a9e0976
treeabf7cb5e1e4b1be54d64d5128e17cc1a62e6c40a
parent099c06e3014b786897d396bdab07037f28a1089b
ovs-ofctl: Encode cookies in OXM-compliant manner.

NXM/OXM are only supposed to put 1-bits in a value if the corresponding bit
in the mask is a 1-bit, but in the case of cookie matching, e.g.
    ovs-ofctl del-flows br0 cookie=0x3/0x1
ovs-ofctl would encode a bad OXM.  This fixes the problem.

(The test "ofproto - del flows based on cookie mask" in the OVS testsuite
tickles this bug.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
lib/nx-match.c
lib/ofp-util.c