ofproto: Fix NXAST_REG_MOVE with NXM_NX_TUN_ID as destination.
authorBen Pfaff <blp@nicira.com>
Wed, 19 Jan 2011 22:53:16 +0000 (14:53 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 19 Jan 2011 22:53:16 +0000 (14:53 -0800)
The documentation claimed this worked but it wasn't actually implemented.

ofproto/ofproto.c

index df5850f..3084c09 100644 (file)
@@ -2863,12 +2863,16 @@ xlate_reg_move_action(struct action_xlate_ctx *ctx,
                       const struct nx_action_reg_move *narm)
 {
     ovs_be16 old_tci = ctx->flow.vlan_tci;
+    ovs_be64 old_tun = ctx->flow.tun_id;
 
     nxm_execute_reg_move(narm, &ctx->flow);
 
     if (ctx->flow.vlan_tci != old_tci) {
         xlate_set_dl_tci(ctx);
     }
+    if (ctx->flow.tun_id != old_tun) {
+        nl_msg_put_be64(ctx->odp_actions, ODPAT_SET_TUNNEL, ctx->flow.tun_id);
+    }
 }
 
 static void