Skip to content

Commit

Permalink
ofproto-dpif: Fix uninitialized data in ofproto_dpif_execute_actions().
Browse files Browse the repository at this point in the history
The dp_hash and recirc_id fields weren't being initialized.

Found by valgrind.

Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Andy Zhou <[email protected]>
  • Loading branch information
blp committed Jun 5, 2014
1 parent b250cce commit 08edf83
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ofproto/ofproto-dpif.c
Original file line number Diff line number Diff line change
Expand Up @@ -3117,18 +3117,18 @@ ofproto_dpif_execute_actions(struct ofproto_dpif *ofproto,
xin.resubmit_stats = &stats;
xlate_actions(&xin, &xout);

execute.actions = ofpbuf_data(&xout.odp_actions);
execute.actions_len = ofpbuf_size(&xout.odp_actions);
execute.packet = packet;
execute.md = pkt_metadata_from_flow(flow);
execute.needs_help = (xout.slow & SLOW_ACTION) != 0;

/* Fix up in_port. */
in_port = flow->in_port.ofp_port;
if (in_port == OFPP_NONE) {
in_port = OFPP_LOCAL;
}
execute.actions = ofpbuf_data(&xout.odp_actions);
execute.actions_len = ofpbuf_size(&xout.odp_actions);
execute.packet = packet;
execute.md.tunnel = flow->tunnel;
execute.md.skb_priority = flow->skb_priority;
execute.md.pkt_mark = flow->pkt_mark;
execute.md.in_port.odp_port = ofp_port_to_odp_port(ofproto, in_port);
execute.needs_help = (xout.slow & SLOW_ACTION) != 0;

error = dpif_execute(ofproto->backer->dpif, &execute);

Expand Down

0 comments on commit 08edf83

Please sign in to comment.