Signed-off-by: Jarno Rajahalme <jarno.rajaha...@nsn.com> --- ofproto/ofproto-dpif.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 3ea4714..61f3a04 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -810,8 +810,7 @@ static size_t compose_sflow_action(const struct ofproto_dpif *, static void compose_ipfix_action(const struct ofproto_dpif *, struct ofpbuf *odp_actions, const struct flow *); -static void add_mirror_actions(struct xlate_ctx *ctx, - const struct flow *flow); +static void add_mirror_actions(struct xlate_ctx *ctx, struct flow *flow); /* Global variables. */ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); @@ -7272,8 +7271,9 @@ vlan_is_mirrored(const struct ofmirror *m, int vlan) } static void -add_mirror_actions(struct xlate_ctx *ctx, const struct flow *orig_flow) +add_mirror_actions(struct xlate_ctx *ctx, struct flow *orig_flow) { + struct flow * flow = ctx->xin->flow; struct ofproto_dpif *ofproto = ctx->ofproto; mirror_mask_t mirrors; struct ofbundle *in_bundle; @@ -7328,8 +7328,8 @@ add_mirror_actions(struct xlate_ctx *ctx, const struct flow *orig_flow) return; } - /* Restore the original packet before adding the mirror actions. */ - *ctx->xin->flow = *orig_flow; + /* Point to the original flow before adding the mirror actions. */ + ctx->xin->flow = orig_flow; while (mirrors) { struct ofmirror *m; @@ -7357,6 +7357,9 @@ add_mirror_actions(struct xlate_ctx *ctx, const struct flow *orig_flow) } } } + + /* Restore current flow pointer */ + ctx->xin->flow = flow; } static void -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev