From 69e8bb3c7fb72de6bf4e984b6980670f89bba07d Mon Sep 17 00:00:00 2001 From: bol-van Date: Sun, 1 Mar 2026 09:48:18 +0300 Subject: [PATCH] AI fixes --- lua/zapret-antidpi.lua | 2 +- lua/zapret-tests.lua | 1 + nfq2/lua.c | 8 ++++---- nfq2/win.c | 6 ------ 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lua/zapret-antidpi.lua b/lua/zapret-antidpi.lua index 270a8c3..a84771c 100644 --- a/lua/zapret-antidpi.lua +++ b/lua/zapret-antidpi.lua @@ -1210,8 +1210,8 @@ function udplen(ctx, desync) else desync.dis.payload = string.sub(desync.dis.payload,1,len+inc) DLOG("udplen: "..len.." => "..#desync.dis.payload) + return VERDICT_MODIFY end - return VERDICT_MODIFY end end end diff --git a/lua/zapret-tests.lua b/lua/zapret-tests.lua index b16d3bc..a2ea6bf 100644 --- a/lua/zapret-tests.lua +++ b/lua/zapret-tests.lua @@ -780,6 +780,7 @@ function test_csum() print( raw==udpb and "UDP RECONSTRUCT OK" or "UDP RECONSTRUCT FAILED" ) test_assert(raw==udpb) + ip.ip_p = IPPROTO_UDP raw = reconstruct_dissect({ip=ip, udp=udp, payload=payload}) dis1 = dissect(raw) ip.ip_p = IPPROTO_UDP diff --git a/nfq2/lua.c b/nfq2/lua.c index f0ee806..a2df011 100644 --- a/nfq2/lua.c +++ b/nfq2/lua.c @@ -2031,7 +2031,7 @@ bool lua_reconstruct_iphdr(lua_State *L, int idx, struct ip *ip, size_t *len) LUA_STACK_GUARD_ENTER(L) - if (*lenip_v = IPVERSION; @@ -2201,7 +2201,7 @@ err: } bool lua_reconstruct_tcphdr(lua_State *L, int idx, struct tcphdr *tcp, size_t *len) { - if (*len