From: Justin Pettit Date: Tue, 17 Nov 2009 02:08:12 +0000 (-0800) Subject: ofproto: Support missing set_nw_dst and set_tp_dst translations X-Git-Tag: v0.99.0~38 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=2d70a31aced4b50f888464a1f986bf82b2aa69d1;p=sliver-openvswitch.git 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. --- 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;