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-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d70a31aced4b50f888464a1f986bf82b2aa69d1;p=openvswitch 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 2894e2d3..f136daec 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;