From ba653d2adb55d3ba3a5d2ca208c2e39b104148e5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 5 Jan 2017 15:58:21 -0800 Subject: 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 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 Acked-by: Mickey Spiegel --- ofproto/ofproto-dpif-xlate.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ofproto') 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 -- cgit v1.2.1