Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-21 00:35:49 +00:00

nfqws2: move ctx from lightuserdata to userdata. prevents crashes on specific ARM cpus

This commit is contained in:
bol-van
2026-01-11 13:58:31 +03:00
parent 349fe3f7d7
commit fd288d5e7d
6 changed files with 87 additions and 46 deletions

View File

@@ -14,6 +14,7 @@
#include "pools.h"
#include "conntrack.h"
#include "darkmagic.h"
#include "params.h"
#if LUA_VERSION_NUM < 503
#define lua_isinteger lua_isnumber
@@ -101,15 +102,4 @@ bool lua_reconstruct_tcphdr(lua_State *L, int idx, struct tcphdr *tcp, size_t *l
bool lua_reconstruct_udphdr(lua_State *L, int idx, struct udphdr *udp);
bool lua_reconstruct_dissect(lua_State *L, int idx, uint8_t *buf, size_t *len, bool badsum, bool ip6_preserve_next);
#define MAGIC_CTX 0xE73DC935
typedef struct {
uint32_t magic;
unsigned int func_n;
const char *func, *instance;
const struct desync_profile *dp;
const struct dissect *dis;
t_ctrack *ctrack;
bool incoming,cancel;
} t_lua_desync_context;
bool lua_instance_cutoff_check(lua_State *L, const t_lua_desync_context *ctx, bool bIn);