lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #26672] close connection when receive window = 0


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #26672] close connection when receive window = 0
Date: Sun, 25 Oct 2009 18:56:28 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; de; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

Follow-up Comment #2, bug #26672 (project lwip):

Since I tested it and it's mainly code moved to another location, I'd regard
this as low risk (meaning 1.3.2), any thoughts on that?

Currently, recvmbox/acceptmbox are drained in the application thread, in
netconn_delete->neconn_free (after do_delconn).

The attached patch moves the draining into an extra function (netconn_drain),
which is called from netconn_delete *before* calling do_delconn. The amount of
drained data is passed to do_delconn (tcpip_thread), which can call
tcp_recved/tcp_accepted accordingly.

The only downside of this approach is that, while draining, recvmbox &
acceptmbox are set to NULL from the application thread, meaning there is a
tiny gap where recv_tcp/accept_function may see them as NULL and must handle
that correctly (covered by the patch).

I have tested it and together with a bug-fix in the TCP_EVENT_RECV macro (has
to call tcp_recved if pcb->recv is NULL), it works decently (remote side can
transfer data until it closes the connection, but that's another bug).

(file #18940)
    _______________________________________________________

Additional Item Attachment:

File name: lwip_26672_1.patch             Size:7 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?26672>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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