From aaa0fbaefadb7fdc2ff07dba1e16b3d6f20467d5 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Sun, 7 Jul 2013 03:52:16 -0700 Subject: [PATCH] ofproto-dpif-xlate: Actually drop packets on mirror ports. Reported-by: Ben Pfaff Signed-off-by: Ethan Jackson Acked-by: Ben Pfaff --- ofproto/ofproto-dpif-xlate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 2ba956015..3a23c1f42 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -195,6 +195,7 @@ add_mirror_actions(struct xlate_ctx *ctx, const struct flow *orig_flow) "%s, which is reserved exclusively for mirroring", ctx->ofproto->up.name, in_bundle->name); } + ofpbuf_clear(&ctx->xout->odp_actions); return; } @@ -2008,10 +2009,12 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) && !actions_output_to_local_port(&ctx)) { compose_output_action(&ctx, OFPP_LOCAL); } + + fix_sflow_action(&ctx); + if (mbridge_has_mirrors(ctx.ofproto->mbridge)) { add_mirror_actions(&ctx, &orig_flow); } - fix_sflow_action(&ctx); } ofpbuf_uninit(&ctx.stack); -- 2.43.0