Pass a protocol based on the prevailing protocol to ofputil_decode_flow_mod()
Note that ofputil_protocol_from_ofp_version() needs to be made
Open Flow 1.1 aware.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
bool need_priority;
enum ofperr error;
enum ofpraw raw;
+ enum ofputil_protocol protocol;
+
+ protocol = ofputil_protocol_from_ofp_version(oh->version);
+ protocol = ofputil_protocol_set_tid(protocol, true);
ofpbuf_init(&ofpacts, 64);
- error = ofputil_decode_flow_mod(&fm, oh, OFPUTIL_P_OF10_TID, &ofpacts);
+ error = ofputil_decode_flow_mod(&fm, oh, protocol, &ofpacts);
if (error) {
ofpbuf_uninit(&ofpacts);
ofp_print_error(s, error);