Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-14 06:13:09 +00:00

AI inspired fixes

This commit is contained in:
bol-van
2026-01-17 10:01:26 +03:00
parent 97cd8cebca
commit 0446b1493b
2 changed files with 3 additions and 2 deletions

View File

@@ -1278,11 +1278,11 @@ void lua_pushf_iphdr(lua_State *L, const struct ip *ip, size_t len)
lua_pushf_int(L,"ip_off",ntohs(ip->ip_off));
lua_pushf_int(L,"ip_ttl",ip->ip_ttl);
lua_pushf_int(L,"ip_p",ip->ip_p);
lua_pushf_int(L,"ip_sum",ip->ip_sum);
lua_pushf_int(L,"ip_sum",ntohs(ip->ip_sum));
lua_pushf_raw(L,"ip_src",&ip->ip_src,sizeof(struct in_addr));
lua_pushf_raw(L,"ip_dst",&ip->ip_dst,sizeof(struct in_addr));
if (b_has_opt)
lua_pushf_raw(L,"options",(uint8_t*)(ip+1),hl-sizeof(struct tcphdr));
lua_pushf_raw(L,"options",(uint8_t*)(ip+1),hl-sizeof(struct ip));
}
else
lua_pushnil(L);