ofproto-dpif-xlate: Restore was_mpls after a patch port.
authorJarno Rajahalme <jrajahalme@nicira.com>
Tue, 24 Mar 2015 18:14:43 +0000 (11:14 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Tue, 24 Mar 2015 18:14:43 +0000 (11:14 -0700)
The peer bridge popping MPLS should have no effect on the original
bridge.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c

index a7cfe06..112c7cd 100644 (file)
@@ -2731,6 +2731,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,
     if (xport->peer) {
         const struct xport *peer = xport->peer;
         struct flow old_flow = ctx->xin->flow;
+        bool old_was_mpls = ctx->was_mpls;
         enum slow_path_reason special;
         uint8_t table_id = rule_dpif_lookup_get_init_table_id(&ctx->xin->flow);
         struct ofpbuf old_stack = ctx->stack;
@@ -2781,6 +2782,10 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,
         ofpbuf_uninit(&ctx->stack);
         ctx->stack = old_stack;
 
+        /* The peer bridge popping MPLS should have no effect on the original
+         * bridge. */
+        ctx->was_mpls = old_was_mpls;
+
         /* The fact that the peer bridge exits (for any reason) does not mean
          * that the original bridge should exit.  Specifically, if the peer
          * bridge recirculates (which typically modifies the packet), the