From f3d5b47390c3c1db31444b8dd5d7f635438a805d Mon Sep 17 00:00:00 2001 From: Jarno Rajahalme Date: Thu, 12 Mar 2015 09:47:31 -0700 Subject: [PATCH] ofproto-dpif-xlate: Do not exit if peer bridge exits. 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 Acked-by: Ben Pfaff --- ofproto/ofproto-dpif-xlate.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 81a7f7221..0e28c777f 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -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); -- 2.20.1