1 --- a/extensions/LUA/xt_LUA_target.c
2 +++ b/extensions/LUA/xt_LUA_target.c
4 #include <linux/kernel.h>
5 #include <linux/slab.h>
6 #include <linux/module.h>
7 -#include <asm/uaccess.h>
8 +#include <linux/uaccess.h>
10 #include <linux/netfilter/x_tables.h>
12 @@ -64,10 +64,10 @@ uint32_t lua_state_refs[LUA_STATE_ARRAY
13 * XT_CONTINUE inside the *register_lua_packet_lib* function.
16 -spinlock_t lock = SPIN_LOCK_UNLOCKED;
17 +DEFINE_SPINLOCK(lock);
20 -lua_tg(struct sk_buff *pskb, const struct xt_target_param *par)
21 +lua_tg(struct sk_buff *pskb, const struct xt_action_param *par)
24 lua_packet_segment *p;
25 @@ -88,11 +88,11 @@ lua_tg(struct sk_buff *pskb, const struc
26 /* push the lua_packet_segment as a parameter */
27 p = (lua_packet_segment *)lua_newuserdata(L, sizeof(lua_packet_segment));
29 - p->start = pskb->mac_header;
30 + p->start = skb_mac_header(pskb);
31 else if (pskb->network_header)
32 - p->start = pskb->network_header;
33 + p->start = skb_network_header(pskb);
34 else if (pskb->transport_header)
35 - p->start = pskb->transport_header;
36 + p->start = skb_transport_header(pskb);
38 p->length = (unsigned long)pskb->tail - (unsigned long)p->start;
40 @@ -208,16 +208,16 @@ static bool load_script_into_state(uint3
41 * some workqueue initialization. So far this is done each time this function
42 * is called, subject to change.
46 lua_tg_checkentry(const struct xt_tgchk_param *par)
48 const struct xt_lua_tginfo *info = par->targinfo;
50 if (load_script_into_state(info->state_id, info->script_size, (char *)info->buf)) {
51 lua_state_refs[info->state_id]++;
60 --- a/extensions/LUA/lua/llimits.h
61 +++ b/extensions/LUA/lua/llimits.h
70 --- a/extensions/LUA/lua/lapi.c
71 +++ b/extensions/LUA/lua/lapi.c
73 ** See Copyright Notice in lua.h
82 --- a/extensions/LUA/lua/ltable.c
83 +++ b/extensions/LUA/lua/ltable.c
85 ** Hence even when the load factor reaches 100%, performance remains good.
92 --- a/extensions/LUA/lua/luaconf.h
93 +++ b/extensions/LUA/lua/luaconf.h
95 #if !defined(__KERNEL__)
98 +#include <linux/kernel.h>
103 #define UCHAR_MAX 255
104 -#define SHRT_MAX 32767
108 @@ -637,6 +641,8 @@ union luai_Cast { double l_d; long l_l;
110 #if defined(__KERNEL__)
111 #undef LUA_USE_ULONGJMP
112 +#define setjmp __builtin_setjmp
113 +#define longjmp __builtin_longjmp
116 #if defined(__cplusplus)
117 --- a/extensions/LUA/lua/llex.h
118 +++ b/extensions/LUA/lua/llex.h
123 +/* prevent conflict with definition from asm/current.h */
126 #define FIRST_RESERVED 257