lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] tcp_connect(ed), ERR_RST


From: Andreas Becker
Subject: [lwip-users] tcp_connect(ed), ERR_RST
Date: Fri, 7 Jan 2005 16:17:30 +0100

Hi all, tcp-staff,

i had a problem with some strange behavior about the working tcp_connect and 
my_tcp_conneced_cb. I'm using the RAW-API with LWIP 0.7.3 (i believe) 

I tried to connect from lwip to an unused port of my Linux machine. By doing 
this, Linux answed with an (RST,ACK).

The docu "rawapi.txt" says that if the connection setup fails 
my_tcp_connected_callback( state, pcb, err) is called with the "err" argument 
set accordingly. This did not happen.

my_tcp_connected_callback is not called, because the tcp_process( ) function 
returns near Line 522 with an ERR_RST. So TCP_EVENT_ERR is called in function 
tcp_input, line 314.

In my opinion, if we detect an RST in tcp_process(),  we have to check if we 
are in SYN_SENT-state an then call TCP_EVENT_CONNECTED( pcb, ERR_RST,err); 
bevore we return with an ERR_RST. (Under normal conditions 
TCP_EVENT_CONNECTED( pcb, ERR_OK,err); is called in tcp_process too, on line 
560.

For now, I use my_err_cb() to detect this error, but this is just a 
work-around.

Bye,

-- 
Dipl.-Ing.(FH) Andreas Becker
Entwicklung

dSys e.K.
Soeflinger Str. 100
D-89077 Ulm
Tel:  +49.731.151579-1
Fax: +49.731.151579-9
web: www.dsys.de




reply via email to

[Prev in Thread] Current Thread [Next in Thread]