Skip to content

Commit

Permalink
ofproto-dpif-upcall: Fix UFID usage with flow_modify.
Browse files Browse the repository at this point in the history
As per the delete_op_init{,__}() functions, the UFID should only be
passed down if ukey->ufid_present is set. Otherwise it is possible to
request a flow modification only using a UFID in a datapath that doesn't
support UFID, which will fail.

Fixes: 43b2f13 ("ofproto: Allow in-place modifications of datapath flows.")
Signed-off-by: Joe Stringer <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
joestringer committed May 17, 2016
1 parent 3ff1613 commit 4106e01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ofproto/ofproto-dpif-upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,7 @@ modify_op_init(struct ukey_op *op, struct udpif_key *ukey)
op->dop.u.flow_put.key_len = ukey->key_len;
op->dop.u.flow_put.mask = ukey->mask;
op->dop.u.flow_put.mask_len = ukey->mask_len;
op->dop.u.flow_put.ufid = &ukey->ufid;
op->dop.u.flow_put.ufid = ukey->ufid_present ? &ukey->ufid : NULL;
op->dop.u.flow_put.pmd_id = ukey->pmd_id;
op->dop.u.flow_put.stats = NULL;
ukey_get_actions(ukey, &op->dop.u.flow_put.actions,
Expand Down

0 comments on commit 4106e01

Please sign in to comment.