Subject: Re: PROBLEM: Linux kernel 2.6.31 IPv4 TCP fails to open huge amount of outgoing connections (unable to bind ... )

From: Evgeniy Polyakov <[email-masked]>
Date: Wed, 21 Apr 2010 22:27:23 +0400

On Wed, Apr 21, 2010 at 01:27:33PM +0200, Eric Dumazet ([email-masked]) wrote:
> Here is the patch I use now and my test application is now able to open
> and connect 1000000 sockets (ulimit -n 1000000)
> 
> Trick is bind_conflict() must refuse a socket to bind to a port on a non
> null IP if another socket already uses same port on same IP.
> 
> Plus the previous patch sent (check a conflict before exiting the search
> loop)
> 
> What do you think ?

Looks good, but do we want to check only reused socket's address there?
What if one of the sockets does not have reuse option turned on, will it
break?

-- 
	Evgeniy Polyakov