struct ofp_header *oh;
oh = (struct ofp_header *) msg;
- if (oh->version != 1 || oh->type >= ARRAY_SIZE(packets)
+ if (oh->version != OFP_VERSION || oh->type >= ARRAY_SIZE(packets)
|| ntohs(oh->length) > length)
return -EINVAL;
ds_put_cstr(&string, "OpenFlow packet too short:\n");
ds_put_hex_dump(&string, oh, len, 0, true);
return ds_cstr(&string);
- } else if (oh->version != 1) {
+ } else if (oh->version != OFP_VERSION) {
ds_put_format(&string, "Bad OpenFlow version %"PRIu8":\n", oh->version);
ds_put_hex_dump(&string, oh, len, 0, true);
return ds_cstr(&string);
struct ofp_header *oh;
oh = (struct ofp_header *) msg;
- if (oh->version != 1 || oh->type >= ARRAY_SIZE(packets)
+ if (oh->version != OFP_VERSION || oh->type >= ARRAY_SIZE(packets)
|| ntohs(oh->length) > length)
return -EINVAL;