tcp: bugfix for seq not in snd/rcv.wnd error (#49)

* tcp: bugfix for seq not in snd/rcv.wnd error

* accept dupe ACKs for window updates and prevent decrement of UNA

* add fixes for incorrect tcp functioning

* remove Conn.Available* methods in favor of Conn.Free* methods due to ambiguous name
This commit is contained in:
Pat Whittingslow
2026-03-04 16:59:30 +01:00
committed by GitHub
parent 02b4e71c2a
commit d5c4fa53c6
10 changed files with 600 additions and 85 deletions
+2 -2
View File
@@ -287,8 +287,8 @@ func (tst *tester) TestTCPHandshake(stack1, stack2 *StackAsync) {
func (tst *tester) TestTCPEstablishedSingleData(srcStack, dstStack *StackAsync, srcConn, dstConn *tcp.Conn, sendData []byte) {
t := tst.t
t.Helper()
availTx := srcConn.AvailableOutput()
availRx := dstConn.AvailableInput()
availTx := srcConn.FreeOutput()
availRx := dstConn.FreeInput()
if availTx < len(sendData) {
t.Fatal("insufficient space for write call", availTx, len(sendData))
} else if len(sendData) <= 0 {