Browse Source

Change TCP Window Size based on SrcPort, not DstPort.

When HTTPS fragment size was set, the program always used it for HTTP, even
if HTTP fragmentation was disabled. This is due to a bug which checked DstPort,
not SrcPort, and the packets passed DstPort != htons(80) HTTPS check.
pull/7/head 0.0.7
ValdikSS 8 years ago
parent
commit
f5ac7c0d67
  1. 4
      goodbyedpi.c

4
goodbyedpi.c

@ -355,11 +355,11 @@ int main(int argc, char *argv[]) {
if (addr.Direction == WINDIVERT_DIRECTION_INBOUND &&
ppTcpHdr->Syn == 1) {
//printf("Changing Window Size!\n");
if (do_fragment_http && ppTcpHdr->DstPort == htons(80)) {
if (do_fragment_http && ppTcpHdr->SrcPort == htons(80)) {
change_window_size(packet, http_fragment_size);
WinDivertHelperCalcChecksums(packet, packetLen, 0);
}
else if (do_fragment_https && ppTcpHdr->DstPort != htons(80)) {
else if (do_fragment_https && ppTcpHdr->SrcPort != htons(80)) {
change_window_size(packet, https_fragment_size);
WinDivertHelperCalcChecksums(packet, packetLen, 0);
}

Loading…
Cancel
Save