ofproto-dpif: Emit set_tunnel when required to.
authorEthan Jackson <ethan@nicira.com>
Mon, 12 Sep 2011 23:56:21 +0000 (16:56 -0700)
committerEthan Jackson <ethan@nicira.com>
Tue, 13 Sep 2011 23:16:58 +0000 (16:16 -0700)
ofproto-dpif assumed that the datapath initialized the tun_id of a
flow on egress, to its tun_id on ingress.  For this reason, if
OpenFlow actions set the tun_id to a flow's ingress tun_id,
ofproto-dpif would fail to emit a set_tunnel action.

Reported-by: Igor Ganichev <iganichev@nicira.com>
Reported-by: Pankaj Thakkar <thakkar@nicira.com>
ofproto/ofproto-dpif.c

index 8a175dc..5ebf057 100644 (file)
@@ -3278,6 +3278,7 @@ xlate_actions(struct action_xlate_ctx *ctx,
     ctx->priority = 0;
     ctx->base_priority = 0;
     ctx->base_flow = ctx->flow;
+    ctx->base_flow.tun_id = 0;
 
     if (process_special(ctx->ofproto, &ctx->flow, ctx->packet)) {
         ctx->may_set_up_flow = false;