WinDivert 1.4 support

This commit is contained in:
ValdikSS 2018-07-19 21:28:32 +03:00
parent 38b1ff1a92
commit a028cb01f4

View File

@ -770,7 +770,7 @@ int main(int argc, char *argv[]) {
);
WinDivertHelperCalcChecksums(
packet, packetLen - packet_dataLen + http_fragment_size, 0
packet, packetLen - packet_dataLen + http_fragment_size, &addr, 0
);
WinDivertSend(
w_filter, packet,
@ -975,11 +975,7 @@ int main(int argc, char *argv[]) {
if (should_reinject) {
//printf("Re-injecting!\n");
if (should_recalc_checksum) {
WinDivertHelperCalcChecksums(packet, packetLen, 0);
}
else {
WinDivertHelperCalcChecksums(packet, packetLen,
WINDIVERT_HELPER_NO_REPLACE);
WinDivertHelperCalcChecksums(packet, packetLen, &addr, NULL);
}
WinDivertSend(w_filter, packet, packetLen, &addr, NULL);
}