At one time, the ofproto-dpif implementation of the 'rule_execute' member
function required, indirectly, at least struct(ofp10_packet_in) bytes of
headroom in the packet passed into it. (This allowed constructing an
OFPT_PACKET_IN without allocating and copying a new ofpbuf.) This
restriction has long been lifted, but rule_execute() had not yet caught
up. This commit updates it.
Signed-off-by: Ben Pfaff <blp@nicira.com>
}
/* Executes the actions indicated by 'rule' on 'packet' and credits 'rule''s
- * statistics appropriately. 'packet' must have at least sizeof(struct
- * ofp_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;
- assert(ofpbuf_headroom(packet) >= sizeof(struct ofp_packet_in));
-
flow_extract(packet, 0, 0, NULL, in_port, &flow);
return rule->ofproto->ofproto_class->rule_execute(rule, &flow, packet);
}