ofproto: Support missing set_nw_dst and set_tp_dst translations
authorJustin Pettit <jpettit@nicira.com>
Tue, 17 Nov 2009 02:08:12 +0000 (18:08 -0800)
committerJustin Pettit <jpettit@nicira.com>
Tue, 17 Nov 2009 02:12:44 +0000 (18:12 -0800)
The function that translates OpenFlow actions into datapath actions was
missing definitions for OFPAT_SET_NW_DST and OFPAT_SET_TP_DST.  This
meant those actions would not occur in the datapath.

ofproto/ofproto.c

index 2894e2d331e9799f8c4c2788d2e361ed6d4fca60..f136daec104cb4224e74522b6f053372da5535e3 100644 (file)
@@ -2147,11 +2147,21 @@ do_xlate_actions(const union ofp_action *in, size_t n_in,
             oa->nw_addr.nw_addr = ia->nw_addr.nw_addr;
             break;
 
+        case OFPAT_SET_NW_DST:
+            oa = odp_actions_add(ctx->out, ODPAT_SET_NW_DST);
+            oa->nw_addr.nw_addr = ia->nw_addr.nw_addr;
+            break;
+
         case OFPAT_SET_TP_SRC:
             oa = odp_actions_add(ctx->out, ODPAT_SET_TP_SRC);
             oa->tp_port.tp_port = ia->tp_port.tp_port;
             break;
 
+        case OFPAT_SET_TP_DST:
+            oa = odp_actions_add(ctx->out, ODPAT_SET_TP_DST);
+            oa->tp_port.tp_port = ia->tp_port.tp_port;
+            break;
+
         case OFPAT_VENDOR:
             xlate_nicira_action(ctx, (const struct nx_action_header *) ia);
             break;