[En-Nut-Discussion] tcp state error !!!

유영동 ydyoo at ajou.ac.kr
Mon Aug 20 14:25:36 CEST 2007


Hi Developers,,
 
I'm sorry that I'm not good at English.
When I tried to test my arm board using "app/httpd/httpserv.c" , my board was down.
So, I used  a program ("ethereal), I found a strange bug.
I used "Microsoft Web Application Stress 1.1." program.
 
my pc : 210.107.194.237
my board : 210.107.194.239
 
***normal case***
[237]               [239]
---->[syn]
<---[syn,ack]
--->[ack]
--->"HTTP GET / HTTP/1.1"
<---[ack]
<---"HTTP HTTP/1.0 200 OK"
--->[rst, ack]
<---[fin, ack]
 
***abnormal case***
--->[syn]
<---[sys,ack]
--->[ack]
--->"HTTP GET / HTTP / 1.1"
<---[ack]
--->[rst,ack]                          <==== in this case, my board is down.
 
 
In this case, I think the board must send some data packets("HTTP/1.0 200 OK ",  etc),
but my pc program sended "rst,ack". (<== abnormal case) and my board was down.

In  "net/tcpsm.c":

static void NutTcpStateEstablished(TCPSOCKET * sock, u_char flags, TCPHDR * th, NETBUF * nb)
{
    if (flags & TH_RST) {
        NutNetBufFree(nb);
        NutTcpAbortSocket(sock, ECONNRESET);
        return;
    }
...

when the "rst" is received, the packet (= socket) is aborted.
    ==> int NutTcpAbortSocket() ... NutTcpDiscardBuffers(sock)...

If the board is going to send data packets, I think the board is down. (?)

What do you think about that?
 
Thanks,
Young-Dong Yoo



More information about the En-Nut-Discussion mailing list