[Top][All Lists]

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

Re: tcp_close: pcb->state - WAS: [lwip-users] portscan

From: Bernhard 'Gustl' Bauer
Subject: Re: tcp_close: pcb->state - WAS: [lwip-users] portscan
Date: Wed, 01 Jul 2009 13:22:04 +0200
User-agent: Thunderbird (Windows/20090605)

Kieran Mansley schrieb:
On Wed, 2009-07-01 at 11:40 +0200, Bernhard 'Gustl' Bauer wrote:
When I send out data, I get http_sent() calls. If all data is sent out I call a tcp_close(). Unfortunately pcb->state is either ESTABLISHED or CLOSE_WAIT and neither does free tcp_pcb.

That's odd.  Is this the state before or after you've called tcp_close
()?  If you've called tcp_close() it should be in FIN_WAIT1, FIN_WAIT2,
CLOSING, or TIME_WAIT on its way to CLOSED.  CLOSE_WAIT is entered if
the other end closes the connection first, and then when you call
tcp_close() it should move to LAST_ACK and then CLOSED.

It is before I call tcp_close(). Afterwards it is FIN_WAIT_1. Some time later it is TIME_WAIT. And in the end tcp_pcb is removed by tcp_slowtmr. Is this the correct way to do it? Is there a way to remove it immediately when it enters TIME_WAIT?


reply via email to

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