Kernel version 0.9 : TCP, bugfix in recieve data ACKed to early

This commit is contained in:
Rémy GIBERT 2017-03-14 17:46:29 +01:00
parent 0769677e5a
commit 99f27d1c23
2 changed files with 8 additions and 14 deletions

View File

@ -18,7 +18,7 @@ IP.IN ldy #S.IP.PROTOCOL
.3 cmp #S.IP.PROTOCOL.TCP .3 cmp #S.IP.PROTOCOL.TCP
bne .9 bne .9
jmp TCP.IN jsr TCP.IN TCP will NOT discard FrameIn
.9 lda hFrameIn .9 lda hFrameIn
>SYSCALL FreeMemA >SYSCALL FreeMemA

View File

@ -151,7 +151,7 @@ TCP.IN.JMP.LISTEN
.99 rts .99 rts
*-------------------------------------- *--------------------------------------
TCP.IN.JMP.SYNSENT TCP.IN.JMP.SYNSENT
ldy #S.TCP.OPTIONS SYN Stend, only accept SYN.ACK packet, then Send ACK ldy #S.TCP.OPTIONS SYN Send, only accept SYN.ACK packet, then Send ACK
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
cmp #S.TCP.OPTIONS.SYN+S.TCP.OPTIONS.ACK cmp #S.TCP.OPTIONS.SYN+S.TCP.OPTIONS.ACK
bne .8 bne .8
@ -222,19 +222,18 @@ TCP.IN.JMP.ESTBLSH
ldy #S.TCP.OPTIONS ldy #S.TCP.OPTIONS
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
bit #S.TCP.OPTIONS.ACK bit #S.TCP.OPTIONS.ACK Remote side ACKed data ?
beq .1 beq .1
jsr SKT.AckDataToSktOut jsr SKT.AckDataToSktOut Yes, Discard sent data
.1 jsr TCP.IN.SetDataInPtrAndLen .1 jsr TCP.IN.SetDataInPtrAndLen
lda ZPDataInLen lda ZPDataInLen Incoming Data in this frame ?
ora ZPDataInLen+1 ora ZPDataInLen+1
beq .2 No data in this incoming frame... beq .2 No data, ...
jsr SKT.AddDataToSktIn jsr SKT.AddDataToSktIn yes, queue data if there is room for....
bcs .9
.2 ldy #S.TCP.OPTIONS .2 ldy #S.TCP.OPTIONS
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
@ -245,11 +244,6 @@ TCP.IN.JMP.ESTBLSH
lda #S.SOCKET.TCP.STATUS.CLWAIT lda #S.SOCKET.TCP.STATUS.CLWAIT
sta (ZPPtrSKT),y sta (ZPPtrSKT),y
ldy #S.SOCKET.TCP.OPTIONS
lda (ZPPtrSKT),y
ora #S.TCP.OPTIONS.ACK
sta (ZPPtrSKT),y
.8 jmp TCP.OUT.I .8 jmp TCP.OUT.I
.9 rts .9 rts
*-------------------------------------- *--------------------------------------