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>
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;
/* 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