1 --- a/extensions/LUA/xt_LUA_target.c
2 +++ b/extensions/LUA/xt_LUA_target.c
3 @@ -64,10 +64,10 @@ uint32_t lua_state_refs[LUA_STATE_ARRAY
4 * XT_CONTINUE inside the *register_lua_packet_lib* function.
7 -spinlock_t lock = SPIN_LOCK_UNLOCKED;
8 +DEFINE_SPINLOCK(lock);
11 -lua_tg(struct sk_buff *pskb, const struct xt_target_param *par)
12 +lua_tg(struct sk_buff *pskb, const struct xt_action_param *par)
15 lua_packet_segment *p;
16 @@ -88,11 +88,11 @@ lua_tg(struct sk_buff *pskb, const struc
17 /* push the lua_packet_segment as a parameter */
18 p = (lua_packet_segment *)lua_newuserdata(L, sizeof(lua_packet_segment));
20 - p->start = pskb->mac_header;
21 + p->start = skb_mac_header(pskb);
22 else if (pskb->network_header)
23 - p->start = pskb->network_header;
24 + p->start = skb_network_header(pskb);
25 else if (pskb->transport_header)
26 - p->start = pskb->transport_header;
27 + p->start = skb_transport_header(pskb);
29 p->length = (unsigned long)pskb->tail - (unsigned long)p->start;
31 @@ -208,16 +208,16 @@ static bool load_script_into_state(uint3
32 * some workqueue initialization. So far this is done each time this function
33 * is called, subject to change.
37 lua_tg_checkentry(const struct xt_tgchk_param *par)
39 const struct xt_lua_tginfo *info = par->targinfo;
41 if (load_script_into_state(info->state_id, info->script_size, (char *)info->buf)) {
42 lua_state_refs[info->state_id]++;
51 --- a/extensions/LUA/lua/llimits.h
52 +++ b/extensions/LUA/lua/llimits.h
61 --- a/extensions/LUA/lua/lapi.c
62 +++ b/extensions/LUA/lua/lapi.c
64 ** See Copyright Notice in lua.h
73 --- a/extensions/LUA/lua/ltable.c
74 +++ b/extensions/LUA/lua/ltable.c
76 ** Hence even when the load factor reaches 100%, performance remains good.
83 --- a/extensions/LUA/lua/luaconf.h
84 +++ b/extensions/LUA/lua/luaconf.h
86 #if !defined(__KERNEL__)
89 +#include <linux/kernel.h>
95 -#define SHRT_MAX 32767
99 @@ -637,6 +641,8 @@ union luai_Cast { double l_d; long l_l;
101 #if defined(__KERNEL__)
102 #undef LUA_USE_ULONGJMP
103 +#define setjmp __builtin_setjmp
104 +#define longjmp __builtin_longjmp
107 #if defined(__cplusplus)