You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking into problems with (seemingly random) receiving only "OutOfSequence" packets after a while (and usually only when lots of packets went over the wire), when I found this comment in TcpStreamGenerator.cs#L235:
//FIXME: we don't handle rolling sequence numbers properly in here
// so after 4GB of packets we will have issues
Which might explain my problem: when the initial Seq number is already a big number, we'd probably reach the uint32 limit rather quickly, causing it to not recognize the packet sequence anymore after it rolled over?
I'm not too familiar with TCP internas - How hard would this be to address? I naively imagine it's just a couple modulo operations here and there, or is there more to it?
The text was updated successfully, but these errors were encountered:
Looks like using those for seq number comparison may be all it needed, since C# rolls over uint32 anyway, so no need for any modulos (unchecked by default).
@Tiax not sure how hard it is to address, I'm guessing it's just a handful of changes where we care about sequence number comparison. Do you have a fix for the comparisons? I've been pretty inactive with the library for a while now since I'm not actively using it but would appreciate a PR if you do fix it.
It worked for me with using the snippet above for lesser/greater than comparisons for the Sequence. Ended up using a different library though in the end, so cannot really tell.
I've been looking into problems with (seemingly random) receiving only "OutOfSequence" packets after a while (and usually only when lots of packets went over the wire), when I found this comment in TcpStreamGenerator.cs#L235:
Which might explain my problem: when the initial Seq number is already a big number, we'd probably reach the uint32 limit rather quickly, causing it to not recognize the packet sequence anymore after it rolled over?
I'm not too familiar with TCP internas - How hard would this be to address? I naively imagine it's just a couple modulo operations here and there, or is there more to it?
The text was updated successfully, but these errors were encountered: