From 2d70a31aced4b50f888464a1f986bf82b2aa69d1 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Mon, 16 Nov 2009 18:08:12 -0800 Subject: [PATCH] ofproto: Support missing set_nw_dst and set_tp_dst translations 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 2894e2d33..f136daec1 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -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; -- 2.45.2