mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2026-01-02 14:48:48 +03:00
Fix tcp4 frag error caused by enabled IP fragmentation
If the packet is fragmented here is no way to deal with it, but we don't care about DF flag in real
This commit is contained in:
6
mangle.c
6
mangle.c
@@ -226,7 +226,11 @@ int tcp4_frag(const __u8 *pkt, __u32 buflen, __u32 payload_offset,
|
||||
}
|
||||
|
||||
|
||||
if (!(ntohs(hdr->frag_off) & IP_DF)) {
|
||||
if (
|
||||
ntohs(hdr->frag_off) & IP_MF ||
|
||||
ntohs(hdr->frag_off) & IP_OFFMASK) {
|
||||
printf("tcp4_frag: frag value: %d\n",
|
||||
ntohs(hdr->frag_off));
|
||||
lgerror("tcp4_frag: ip fragmentation is set", -EINVAL);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user