[ovs-dev] [load tun_id 1/2] ofproto: Fix NXAST_REG_MOVE with NXM_NX_TUN_ID as destination.

Ben Pfaff blp at nicira.com
Wed Jan 19 22:56:45 UTC 2011


The documentation claimed this worked but it wasn't actually implemented.
---
 ofproto/ofproto.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index df5850f..3084c09 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -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
-- 
1.7.1





More information about the dev mailing list