diff --git a/kernel/trunk/network/eth_drv/drivers/3c59x.inc b/kernel/trunk/network/eth_drv/drivers/3c59x.inc index f978b13c4c..a61d8297a1 100644 --- a/kernel/trunk/network/eth_drv/drivers/3c59x.inc +++ b/kernel/trunk/network/eth_drv/drivers/3c59x.inc @@ -2134,10 +2134,10 @@ e3c59x_boomerang_transmit: @@: ; calculate mov ebx, ecx - test byte [e3c59x_has_hwcksm], 0xff - jz @f -;;; or ebx, (1 shl 26) ; set AddTcpChecksum -@@: + ;test byte [e3c59x_has_hwcksm], 0xff + ;jz @f + ;or ebx, (1 shl 26) ; set AddTcpChecksum +;@@: or ebx, 0x8000 ; transmission complete notification or ecx, 0x80000000 ; last fragment ; program DPD diff --git a/kernel/trunk/network/socket.inc b/kernel/trunk/network/socket.inc index 2d22043958..37e2b8b532 100644 --- a/kernel/trunk/network/socket.inc +++ b/kernel/trunk/network/socket.inc @@ -584,6 +584,8 @@ local sockAddr dd ? je .destroy_tcb cmp [ebx + SOCKET.TCBState], TCB_SYN_SENT je .destroy_tcb + cmp [ebx + SOCKET.TCBState], TCB_CLOSED + je .destroy_tcb ; Now construct the response, and queue for sending by IP mov eax, EMPTY_QUEUE diff --git a/kernel/trunk/network/tcp.inc b/kernel/trunk/network/tcp.inc index 0c7ce6ae4a..ae01e2ba42 100644 --- a/kernel/trunk/network/tcp.inc +++ b/kernel/trunk/network/tcp.inc @@ -888,7 +888,7 @@ proc stateTCB_ESTABLISHED stdcall, sockAddr:DWORD jne .exit ; Did we receive a FIN or RST? - test [edx + 20 + TCP_PACKET.Flags], TH_FIN + test [edx + 20 + TCP_PACKET.Flags], TH_FIN+TH_RST jz .check_ack ; It was a fin or reset. @@ -922,6 +922,10 @@ proc stateTCB_ESTABLISHED stdcall, sockAddr:DWORD @@: ; Send an ACK to that fin, and enter closewait state mov [ebx + SOCKET.TCBState], TCB_CLOSE_WAIT + test [edx + 20 + TCP_PACKET.Flags], TH_RST + je @f + mov [ebx + SOCKET.TCBState], TCB_CLOSED + @@: call signal_network_event lea esi, [ebx + SOCKET.RCV_NXT] mov eax, [esi] ; save original