-
Notifications
You must be signed in to change notification settings - Fork 41
add luadata_clear for netfilter & xtable #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,8 +124,13 @@ static int luaxtable_pushparams(lua_State *L, const struct xt_action_param *par, | |
| return 0; | ||
| } | ||
|
|
||
| static inline int luaxtable_cleanup(luaxtable_t *xtable) | ||
| { | ||
| return luadata_clear(xtable->skb); | ||
| } | ||
|
|
||
| #define luaxtable_call(L, op, xtable, skb, par, info, opt) \ | ||
| ((luaxtable_pushparams(L, par, xtable, skb, opt) == -1) || (luaxtable_docall(L, xtable, info, op, 2, 1) == -1)) | ||
| ((luaxtable_pushparams(L, par, xtable, skb, opt) == -1) || (luaxtable_docall(L, xtable, info, op, 2, 1) == -1) || luaxtable_cleanup(xtable)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it will only be called in case of success, right? as I mentioned, both cases should be handled
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO, the best approach is to move the luadata_clear() call to luaxtable_docall() body.. |
||
|
|
||
| static int luaxtable_domatch(lua_State *L, luaxtable_t *xtable, const struct sk_buff *skb, struct xt_action_param *par, int fallback) | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.