From a88ab4337e47bda8f71f53d1f9a466caa36591f9 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Wed, 20 Dec 2017 03:33:30 +0300 Subject: [PATCH] Apply HTTP Persistent fragmentation only for sufficiently large packets --- goodbyedpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/goodbyedpi.c b/goodbyedpi.c index 8227da9..0603000 100644 --- a/goodbyedpi.c +++ b/goodbyedpi.c @@ -533,7 +533,9 @@ int main(int argc, char *argv[]) { * ack number of received packet and retransmitting missing part again, * but it's better to send it anyway since it eliminates one RTT. */ - if (do_fragment_http_persistent && !http_req_fragmented) { + if (do_fragment_http_persistent && !http_req_fragmented && + (packet_dataLen > http_fragment_size) + ) { ppIpHdr->Length = htons( ntohs(ppIpHdr->Length) - packet_dataLen + http_fragment_size