}
/* Executes the actions indicated by 'rule' on 'packet' and credits 'rule''s
- * statistics appropriately. 'packet' must have at least sizeof(struct
- * ofp10_packet_in) bytes of headroom.
+ * statistics appropriately.
*
* 'packet' doesn't necessarily have to match 'rule'. 'rule' will be credited
* with statistics for 'packet' either way.
struct flow flow;
union flow_in_port in_port_;
- ovs_assert(ofpbuf_headroom(packet) >= sizeof(struct ofp10_packet_in));
-
in_port_.ofp_port = in_port;
flow_extract(packet, 0, 0, NULL, &in_port_, &flow);
return rule->ofproto->ofproto_class->rule_execute(rule, &flow, packet);
goto exit_free_ofpacts;
}
} else {
- payload = xmalloc(sizeof *payload);
- ofpbuf_use_const(payload, po.packet, po.packet_len);
+ /* Ensure that the L3 header is 32-bit aligned. */
+ payload = ofpbuf_clone_data_with_headroom(po.packet, po.packet_len, 2);
}
/* Verify actions against packet, then send packet if successful. */