This bug was not yet visible because none of the messages that would be misinterpreted were yet implemented.
Signed-off-by: Ben Pfaff <b...@nicira.com> --- lib/ofp-util.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 95aa558..5cb07b5 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -763,16 +763,19 @@ ofputil_decode_msg_type__(const struct ofp_header *oh, size_t length, error = ofputil_lookup_openflow_message(&ofpt_category, oh->version, oh->type, typep); if (!error) { - switch (oh->type) { - case OFPT_VENDOR: + switch ((oh->version << 8) | oh->type) { + case (OFP10_VERSION << 8) | OFPT_VENDOR: + case (OFP11_VERSION << 8) | OFPT_VENDOR: error = ofputil_decode_vendor(oh, length, typep); break; - case OFPT10_STATS_REQUEST: + case (OFP10_VERSION << 8) | OFPT10_STATS_REQUEST: + case (OFP11_VERSION << 8) | OFPT11_STATS_REQUEST: error = ofputil_decode_ofpst_request(oh, length, typep); break; - case OFPT10_STATS_REPLY: + case (OFP10_VERSION << 8) | OFPT10_STATS_REPLY: + case (OFP11_VERSION << 8) | OFPT11_STATS_REPLY: error = ofputil_decode_ofpst_reply(oh, length, typep); default: -- 1.7.2.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev