Skip to content

Commit

Permalink
ofproto-dpif-xlate: Do not exit if peer bridge exits.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarno Rajahalme committed Mar 17, 2015
1 parent ed9c9e3 commit f3d5b47
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ofproto/ofproto-dpif-xlate.c
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit f3d5b47

Please sign in to comment.