[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #10370] Raw API: Callback for received FIN to confirm
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [task #10370] Raw API: Callback for received FIN to confirm connection is closed |
Date: |
Sat, 15 May 2010 18:12:35 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 |
Update of task #10370 (project lwip):
Status: None => Ready For Test
Percent Complete: 0% => 100%
Assigned to: None => goldsimon
_______________________________________________________
Follow-up Comment #4:
That change is nearly three months ago now, but that doesn't matter much.
The actual bug in the changes introduced by task #10088 was the handling of
RX packets when TF_RXCLOSED was set: pcb->sent() was still called but ->recv()
wasn't.
I changed that so ->recv() is called but the connection is reset when packets
including data are received when TF_RXCLOSED is set. This is to inform the
remote host that not all the data it sent has been processed (and what is done
in tcp_close_shutdown(), too).
So basically, the stack should now behave much the same as 1.3.2 did with
these differences:
- no more rx packets after calling tcp_close,
- if there is unacked rx data (i.e. the receive window is not at its full
size) *or* data arrives after we called close: RST is sent and the connection
is aborted
This means that we can still call close right after enqueueing all packets
and receive the remote host's FIN correctly unless it breaks our assumptions
and still sends data.
Receiving data after closing our TX channel can be done by calling
tcp_shutdown.
Iordan, could you please verify this works as I expect it to?
Thanks for reporting this!
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?10370>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/