ofproto: connmgr_send_packet_in() doesn't need buffer_id and total_len.
[sliver-openvswitch.git] / ofproto / connmgr.c
index 4343622..1f5fbed 100644 (file)
@@ -1278,7 +1278,9 @@ connmgr_send_flow_removed(struct connmgr *mgr,
 }
 
 /* Given 'pin', sends an OFPT_PACKET_IN message to each OpenFlow controller as
- * necessary according to their individual configurations. */
+ * necessary according to their individual configurations.
+ *
+ * The caller doesn't need to fill in pin->buffer_id or pin->total_len. */
 void
 connmgr_send_packet_in(struct connmgr *mgr,
                        const struct ofputil_packet_in *pin)
@@ -1310,6 +1312,8 @@ schedule_packet_in(struct ofconn *ofconn, struct ofputil_packet_in pin)
 {
     struct connmgr *mgr = ofconn->connmgr;
 
+    pin.total_len = pin.packet_len;
+
     /* Get OpenFlow buffer_id. */
     if (pin.reason == OFPR_ACTION) {
         pin.buffer_id = UINT32_MAX;