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-30 19:18:17 +03:00
parent 2a2a3e4f73
commit 5f87b7670a
2 changed files with 3 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ static void ConntrackApplyPos(t_ctrack *t, bool bReverse, const struct dissect *
if (dis->ip6) direct->ip6flow = ntohl(dis->ip6->ip6_ctlun.ip6_un1.ip6_un1_flow);
scale = tcp_find_scale_factor(dis->tcp);
mss = ntohs(tcp_find_mss(dis->tcp));
mss = tcp_find_mss(dis->tcp);
direct->seq_last = ntohl(dis->tcp->th_seq);
direct->pos = direct->seq_last + dis->len_payload;

View File

@@ -1435,8 +1435,8 @@ bool IsStunMessage(const uint8_t *data, size_t len)
return len>=20 && // header size
(data[0]&0xC0)==0 && // 2 most significant bits must be zeroes
(data[3]&3)==0 && // length must be a multiple of 4
ntohl(pntoh32(data+4))==0x2112A442 && // magic cookie
ntohs(pntoh16(data+2))==(len-20);
pntoh32(data+4)==0x2112A442 && // magic cookie
pntoh16(data+2)==(len-20);
}
#if defined(__GNUC__) && !defined(__llvm__)
__attribute__((optimize ("no-strict-aliasing")))