X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 15 Dec 2009 18:10:51 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: SO_REUSEADDR and windows enhanced socket security Message-ID: <20091215171051.GH8059@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4B27AFEB DOT 4030609 AT gmail DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B27AFEB.4030609@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Dec 15 18:48, yesin wrote: > looks like a problem with SO_REUSEADDR exists in CYGWIN for all > windows with support for "Enhanced socket security" (see > http://msdn.microsoft.com/en-us/library/ms740621(VS.85).aspx ) > > > i'am trying to start multimple simultaneous UDP listeners for a > multicast packets on a single machine (reuse same address and port > with SO_REUSEADDR) > [...] > with cygwin environment i can't run multiple listerers... bind error: > Address already in use! Thanks for the report and especially thanks for the testcase. There is code in Cygwin which skips calls to setsockopt(SO_REUSEADDR) on systems supporting enhanced socket security. That's necessary to emulate socket re-binding behaviour more closely to POSIX behaviour. The problem was that this should have been only called for TCP sockets but Cygwin accidentally called it for UDP sockets as well. I fixed that in CVS. Thanks again, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple