Skip to content

Commit

Permalink
fixup! add XDPLua
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorNogueiraRio committed Aug 27, 2020
1 parent e462d21 commit 809562b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -4854,15 +4854,16 @@ BPF_CALL_4(bpf_lua_pcall, struct xdp_buff *, ctx, char *, funcname,
goto clean_state;
}

lua_insert(ctx->L, 1);
lua_insert(ctx->L, base + 1);
if (lua_pcall(ctx->L, num_args, num_rets, 0)) {
pr_err("%s\n", lua_tostring(ctx->L, -1));
num_rets = 0;
goto clean_state;
}

clean_state:
base += num_rets;

clean_state:
lua_settop(ctx->L, base);
return num_rets;
}
Expand Down

0 comments on commit 809562b

Please sign in to comment.