const union ofp_action *in; /* OpenFlow actions. */
size_t n_in; /* Number of elements in 'in' array. */
const flow_t *flow; /* Flow to which these actions correspond. */
- struct ofproto *ofproto; /* For OFPP_TABLE, NXAST_RESUBMIT only. */
+ int recurse; /* Recursion level, via xlate_table_action. */
+ struct ofproto *ofproto;
/* Output. */
struct odp_actions *out; /* Datapath actions. */
struct rule *rule;
flow_t flow;
- if (!p) {
+ if (ctx->recurse) {
return;
}
nested_ctx.in = rule->actions;
nested_ctx.n_in = rule->n_actions;
nested_ctx.flow = ctx->flow;
- nested_ctx.ofproto = NULL; /* Prevent recursion. */
+ nested_ctx.recurse = ctx->recurse + 1;
+ nested_ctx.ofproto = ctx->ofproto;
nested_ctx.out = ctx->out;
do_xlate_actions(&nested_ctx);
}
ctx.in = in;
ctx.n_in = n_in;
ctx.flow = flow;
+ ctx.recurse = 0;
ctx.ofproto = ofproto;
ctx.out = out;
do_xlate_actions(&ctx);