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

AI and manual fixes

This commit is contained in:
bol-van
2026-01-14 16:39:16 +03:00
parent aa5a1f4183
commit ffcb14726d
5 changed files with 36 additions and 33 deletions

View File

@@ -339,8 +339,7 @@ void proto_skip_udp(const uint8_t **data, size_t *len)
bool proto_check_ipv6(const uint8_t *data, size_t len)
{
return len >= sizeof(struct ip6_hdr) && (data[0] & 0xF0) == 0x60 &&
(len - sizeof(struct ip6_hdr)) >= ntohs(((struct ip6_hdr*)data)->ip6_ctlun.ip6_un1.ip6_un1_plen);
return len >= sizeof(struct ip6_hdr) && (data[0] & 0xF0) == 0x60;
}
// move to transport protocol
// proto_type = 0 => error