summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-01-05 15:58:21 -0800
committerBen Pfaff <blp@ovn.org>2017-01-05 20:46:35 -0800
commitba653d2adb55d3ba3a5d2ca208c2e39b104148e5 (patch)
tree1ac3d10ab8282478ac7fb3d9da5c276061249a21 /ofproto
parentc3b85eeb3d840dc39a295e03ca4172a7b59e3bf4 (diff)
downloadopenvswitch-ba653d2adb55d3ba3a5d2ca208c2e39b104148e5.tar.gz
ofproto-dpif-xlate: Make clone save whether conntracking has occurred.
The rest of the conntrack state (in the flow) is saved and restored, so this should be also. 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>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif-xlate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 371ced441..fb552cea9 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -4316,9 +4316,16 @@ xlate_sample_action(struct xlate_ctx *ctx,
static void
compose_clone_action(struct xlate_ctx *ctx, const struct ofpact_nest *oc)
{
+ bool old_conntracked = ctx->conntracked;
struct flow old_flow = ctx->xin->flow;
+
do_xlate_actions(oc->actions, ofpact_nest_get_action_len(oc), ctx);
+
ctx->xin->flow = old_flow;
+
+ /* The clone's conntrack execution should have no effect on the original
+ * packet. */
+ ctx->conntracked = old_conntracked;
}
static bool