Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: 15 Nov 2001 17:53:36 -0500 Message-ID: <20011115225336.8297.qmail@lizard.curl.com> From: Jonathan Kamens To: cygwin-developers AT cygwin DOT com In-reply-to: <20011115234952.F27452@cygbert.vinschen.de> (message from Corinna Vinschen on Thu, 15 Nov 2001 23:49:52 +0100) Subject: Re: Fixing openssh to avoid occasional spurious connection failures References: <20011115213959 DOT 6226 DOT qmail AT lizard DOT curl DOT com> <052f01c16e1f$ffb61890$0200a8c0 AT lifelesswks> <20011115215733 DOT 6471 DOT qmail AT lizard DOT curl DOT com> <20011115230625 DOT D27452 AT cygbert DOT vinschen DOT de> <20011115221455 DOT 6571 DOT qmail AT lizard DOT curl DOT com> <20011115234952 DOT F27452 AT cygbert DOT vinschen DOT de> > Date: Thu, 15 Nov 2001 23:49:52 +0100 > From: Corinna Vinschen > > Oh, btw., I never saw that test program. I gave the URL to it in my first message about this today to cygwin-apps. Here it is again.... . > However, calling bind before calling connect is superfluous and a > bit dangerous... > > So, I'm a bit tired right now (about midnight)... does SSH call > bind before connect? No, not by default, but it doesn't matter, because the problem still happens if you take out the bind() call and the call to getsockname() after it in my test program. I mentioned this in my message to cygwin-developers: Note, furthermore, that the problem still occurs if the client program doesn't bind() the socket before the connect() -- the only reason I do the bind() in the sample program below is to make it possible to print out the local port number after a failure. jik