}
/* 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)
{
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;
pin.packet = packet->data;
pin.packet_len = packet->size;
- pin.total_len = packet->size;
pin.reason = OFPR_NO_MATCH;
pin.controller_id = 0;
pin.table_id = 0;
pin.cookie = 0;
- pin.buffer_id = 0; /* not yet known */
pin.send_len = 0; /* not used for flow table misses */
flow_get_metadata(flow, &pin.fmd);
pin.table_id = ctx->table_id;
pin.cookie = ctx->rule ? ctx->rule->up.flow_cookie : 0;
- pin.buffer_id = 0;
pin.send_len = len;
- pin.total_len = packet->size;
flow_get_metadata(&ctx->flow, &pin.fmd);
connmgr_send_packet_in(ctx->ofproto->up.connmgr, &pin);