X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-util.c;fp=lib%2Fofp-util.c;h=579be73f1c21e564f2d3f6698b1c641f2f9d5f85;hb=299016266ed13376a7d671f66d4e0181b41098e3;hp=d9ebcda704358d1d68965be5fcfd42912c4b0e7e;hpb=0697b5c3c9954057028f406757c4fd0208b929b9;p=sliver-openvswitch.git diff --git a/lib/ofp-util.c b/lib/ofp-util.c index d9ebcda70..579be73f1 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -1966,6 +1966,15 @@ ofputil_check_output_port(uint16_t port, int max_ports) } } +static int +check_resubmit_table(const struct nx_action_resubmit *nar) +{ + if (nar->pad[0] || nar->pad[1] || nar->pad[2]) { + return ofp_mkerr(OFPET_BAD_ACTION, OFPBAC_BAD_ARGUMENT); + } + return 0; +} + int validate_actions(const union ofp_action *actions, size_t n_actions, const struct flow *flow, int max_ports) @@ -2044,6 +2053,11 @@ validate_actions(const union ofp_action *actions, size_t n_actions, max_ports, flow); break; + case OFPUTIL_NXAST_RESUBMIT_TABLE: + error = check_resubmit_table( + (const struct nx_action_resubmit *) a); + break; + case OFPUTIL_OFPAT_STRIP_VLAN: case OFPUTIL_OFPAT_SET_NW_SRC: case OFPUTIL_OFPAT_SET_NW_DST: @@ -2151,6 +2165,7 @@ ofputil_decode_nxast_action(const union ofp_action *a) NXAST_ACTION(NXAST_AUTOPATH, struct nx_action_autopath, false); NXAST_ACTION(NXAST_BUNDLE, struct nx_action_bundle, true); NXAST_ACTION(NXAST_BUNDLE_LOAD, struct nx_action_bundle, true); + NXAST_ACTION(NXAST_RESUBMIT_TABLE, struct nx_action_resubmit, false); #undef NXAST_ACTION case NXAST_SNAT__OBSOLETE: