ofproto-dpif-xlate: Do not exit if peer bridge exits.
authorJarno Rajahalme <jrajahalme@nicira.com>
Thu, 12 Mar 2015 16:47:31 +0000 (09:47 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Tue, 17 Mar 2015 20:21:12 +0000 (13:21 -0700)
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
original bridge must continue processing with the original, not the
recirculated packet!

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

index 81a7f72..0e28c77 100644 (file)
@@ -2765,6 +2765,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,
                 struct flow old_base_flow = ctx->base_flow;
                 size_t old_size = ctx->xout->odp_actions->size;
                 mirror_mask_t old_mirrors = ctx->xout->mirrors;
+
                 xlate_table_action(ctx, flow->in_port.ofp_port, table_id,
                                    true, true);
                 ctx->xout->mirrors = old_mirrors;
@@ -2780,6 +2781,13 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,
         ofpbuf_uninit(&ctx->stack);
         ctx->stack = old_stack;
 
+        /* 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
+         * original bridge must continue processing with the original, not the
+         * recirculated packet! */
+        ctx->exit = false;
+
         if (ctx->xin->resubmit_stats) {
             netdev_vport_inc_tx(xport->netdev, ctx->xin->resubmit_stats);
             netdev_vport_inc_rx(peer->netdev, ctx->xin->resubmit_stats);