lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] Connections being incorrectly reset when using


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] Connections being incorrectly reset when using sockets API [patch]
Date: Thu, 09 Jan 2003 01:32:28 -0000

Hi!

On Thursday 13 June 2002 19.42, you wrote:
> I use the BSD sockets interface, and noticed this problem when connections
> were being reset before all data was transfered. This occurs because an
> lwip_close() results in a call to do_delconn() which calls tcp_accept(pcb,
> NULL) - this call results in pcb.remote_ip getting set to 0, so incoming
> ACK's no longer get matched with this pcb and an RST gets sent - not
> good...
>
> Patch attached. It adds a few elements to struct tcp_pcb_listen - i hope
> this is ok with people who are short on memory...

Another solution would be to remove the call to tcp_accept(pcb, NULL) - it is 
only needed for LISTEN pcbs anyway. There is already a check for LISTEN pcbs, 
so I just moved it a bit and moved all the other tcp_ functions out to the 
"else" case.

> Adam, i take it that this change came about in response to
> http://www.sics.se/~adam/lwip/maillist/msg00991.html
> Any chance you could reply to these sort of messages on the list if you fix
> the problem? Otherwise, we end up adding random fixes that people have
> posted to the list to our tree, and don't know what your releases do and
> don't fix - its much nicer if we know a fix has been applied and we just
> need to get the next CVS snapshot to get it.

I usually try to keep up with things on the mailing list and with bugpatches. 
I've been really bad the last month, though (sorry about that).

> Cheers,
> Dunk

/dunkels :-)
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]




reply via email to

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