2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

ofp-util: Allow encoding of Open Flow 1.1 and 1.2 Packet Out Messages

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Simon Horman
2012-08-08 06:49:43 +09:00
committed by Ben Pfaff
parent de0f3156a0
commit 7c1b1a0d43

View File

@@ -3073,7 +3073,21 @@ ofputil_encode_packet_out(const struct ofputil_packet_out *po,
}
case OFP11_VERSION:
case OFP12_VERSION:
case OFP12_VERSION: {
struct ofp11_packet_out *opo;
size_t len;
msg = ofpraw_alloc(OFPRAW_OFPT11_PACKET_OUT, ofp_version, size);
ofpbuf_put_zeros(msg, sizeof *opo);
len = ofpacts_put_openflow11_actions(po->ofpacts, po->ofpacts_len, msg);
opo = msg->l3;
opo->buffer_id = htonl(po->buffer_id);
opo->in_port = ofputil_port_to_ofp11(po->in_port);
opo->actions_len = htons(len);
break;
}
default:
NOT_REACHED();
}