Signed-off-by: Simon Horman <[email protected]>

---

v2
* No change
---
 lib/ofp-util.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index 7a73e01..5f3055a 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -3296,7 +3296,15 @@ ofputil_encode_packet_out(const struct 
ofputil_packet_out *po,
         packet_len = po->packet_len;
     }
 
-    if (ofp_version == OFP10_VERSION) {
+    if (ofp_version == OFP11_VERSION || ofp_version == OFP12_VERSION) {
+        struct ofp11_packet_out *opo;
+
+        msg = ofpbuf_new(packet_len + sizeof *opo);
+        opo = put_openflow(sizeof *opo, OFPT11_PACKET_OUT, msg);
+        opo->buffer_id = htons(po->buffer_id);
+        opo->in_port = ofputil_port_to_ofp11(po->in_port);
+        opo->actions_len = htons(msg->size - sizeof *opo);
+    } else if (ofp_version == OFP10_VERSION) {
         struct ofp_packet_out *opo;
 
         msg = ofpbuf_new(packet_len + sizeof *opo);
-- 
1.7.10.2.484.gcd07cc5

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to