The UFID parameter to dpif_flow_get() is optional, but the current
implementation dereferences it to initialize part of the output flow.
This field is filled in by the dpif implementation, so don't initialize
it here.

This could cause a NULL dereference if a dpif_flow_get() caller doesn't
provide a UFID. Currently there are no such callers, but the next patch
will introduce one.

Signed-off-by: Joe Stringer <joestrin...@nicira.com>
---
 lib/dpif.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/dpif.c b/lib/dpif.c
index 50a7cc1..87954ed 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -893,7 +893,6 @@ dpif_flow_get(struct dpif *dpif,
     op.u.flow_get.flow = flow;
     op.u.flow_get.flow->key = key;
     op.u.flow_get.flow->key_len = key_len;
-    op.u.flow_get.flow->ufid = *ufid;
 
     opp = &op;
     dpif_operate(dpif, &opp, 1);
-- 
1.7.10.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to