Properly handle Native Fragmentation packet of bigger or equal size than the fragment size

This commit is contained in:
ValdikSS 2021-12-29 16:09:47 +03:00
parent 46c4f36de8
commit 372cc6a45d

View File

@ -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(