summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-01-05 16:11:15 -0800
committerBen Pfaff <blp@ovn.org>2017-01-10 10:39:04 -0800
commitbd3c2df3a8f7e47eff8c124e8e45d36ac3672869 (patch)
tree4202ee5dd5002947d8b602820077a12ab09c057a /ofproto
parentb827b2311f2dbcd8cd3d08d37df80f62a0d01b45 (diff)
downloadopenvswitch-bd3c2df3a8f7e47eff8c124e8e45d36ac3672869.tar.gz
ofproto-dpif-xlate: Make clone save "was_mpls".
This seems like it's an optimization rather than a correctness issue, but in general it's best to make "clone" like patch ports where there is no reason to depart from its design, since we know that patch ports work well. Reported-by: Mickey Spiegel <mickeys.dev@gmail.com> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-January/326981.html Fixes: 7ae62a676d3a ("ofp-actions: Add clone action.") Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Mickey Spiegel <mickeys.dev@gmail.com> Tested-by: Dong Jun <dongj@dtdream.com>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif-xlate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 56a2552b3..0e273cc1b 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -4315,6 +4315,7 @@ xlate_sample_action(struct xlate_ctx *ctx,
static void
compose_clone_action(struct xlate_ctx *ctx, const struct ofpact_nest *oc)
{
+ bool old_was_mpls = ctx->was_mpls;
bool old_conntracked = ctx->conntracked;
struct flow old_flow = ctx->xin->flow;
@@ -4341,6 +4342,10 @@ compose_clone_action(struct xlate_ctx *ctx, const struct ofpact_nest *oc)
/* The clone's conntrack execution should have no effect on the original
* packet. */
ctx->conntracked = old_conntracked;
+
+ /* Popping MPLS from the clone should have no effect on the original
+ * packet. */
+ ctx->was_mpls = old_was_mpls;
}
static bool