0
votes

I am working on applications that communicate through the TCP channel through windivert library. It is working fine for small packets but in case of large TCP packets i.e. over 10000 bytes, segments are lost during transmission. Following is the scenario:

  • 11086 bytes of data split into 20 segments of 536 bytes
  • I receive random packets i.e. sometimes 18 or 19 and sometimes all packets
  • In case of loss packets, DUP ACK is sent or retransmission occurs
  • Sometimes packets arrived in out of order
  • For each packet which application receives, ACK is sent out

Is this due to ACK timeout issue or something else?

1

1 Answers

1
votes

Windivert does not try to preserve packet order. As the documentation says:

WinDivert can cause packets to be out-of-order: Simply running the passthru.exe sample program can cause packets to become out-of-order. This is not a bug, since there is no requirement for packets to remain in-order. However, this may affect other buggy software (e.g. some buggy NAT implementations) that incorrectly assume packets to be in-order.

If you're filtering lots of packets in user space, that can also cause packets to be lost. As the documentation says:

Packets/events are not queued indefinitely, and if not handled in a timely manner, data may be lost. The amount of time a packet/event is queued can be controlled using the WinDivertSetParam() function.

You don't describe any serious consequences or specific problems, so I would say everything you're describing is probably normal.

One last thing, there's no such thing as a "large TCP packet". You are just talking about cases where there's a lot of data to send or a large number of TCP packets received at about the same time.