From 372cc6a45dfa8714e83400fcada97b4835852873 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Wed, 29 Dec 2021 16:09:47 +0300 Subject: [PATCH] Properly handle Native Fragmentation packet of bigger or equal size than the fragment size --- src/goodbyedpi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/goodbyedpi.c b/src/goodbyedpi.c index 9a51bb0..87870de 100644 --- a/src/goodbyedpi.c +++ b/src/goodbyedpi.c @@ -458,6 +458,13 @@ static void send_native_fragment(HANDLE w_filter, WINDIVERT_ADDRESS addr, memcpy(&packet_bak, packet, packetLen); UINT orig_packetLen = packetLen; + if (fragment_size >= packet_dataLen) { + if (step == 1) + fragment_size = 0; + else + return; + } + if (step == 0) { if (packet_v4) ppIpHdr->Length = htons(