lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Potential bug in tcp_close 1.4.2 rc1


From: Brent Kucera
Subject: Re: [lwip-devel] Potential bug in tcp_close 1.4.2 rc1
Date: Thu, 24 Mar 2011 15:46:40 -0600

You are correct, the problem is that when I shut down the server (calling echo_close, which calls tcp_close), then restart the server, tcp_bind fails with ERR_USE.I think it shouldn't because if I close a connection, that port ought to be free regardless of what the other side does.

By "ore platform", do you mean other platform? Like, writing an echo server on linux, connecting with netcat, and seeing what happens? I'll give that a try, won't have time today but early next week for sure.

I did try turning SO_REUSE on, and that's causing a null pointer to be dereferenced somewhere when I ctrl+c out of netcat after shutting down and restarting the server. I'll track that down next week as well, it might very well be in my code and not LWIP.

On Thu, Mar 24, 2011 at 3:08 PM, Simon Goldschmidt <address@hidden> wrote:
Brent Kucera <address@hidden> wrote:
> If I call echo_close while netcat is connected, tcp_close returns ERR_OK. If I then try to restart the server, tcp_bind fails with ERR_USE. The reason is that a pcb bound to port 7 is still in the tcp_active_pcbs list.

Am I correct in suspecting that your problem is that tcp_bind fails with ERR_USE (that wasn't quite clear to me)? If so, that's pretty normal for sockets. If you want something different, so have to specify the SO_REUSE flag (using setsockopt, if I remember correctly).

Have you tried this on any ore platform to come to the conclusion that lwIP is wrong? If so, which platform?

Simon
_______________________________________________
lwip-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-devel


reply via email to

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