This is the mail archive of the
mailing list for the Cygwin project.
Re: RPC clnt_create() adress already in use
- From: "PAULUS, Raimund, TI-ABN" <Raimund dot Paulus at dillinger dot biz>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Tue, 27 Feb 2018 09:54:03 +0000
- Subject: Re: RPC clnt_create() adress already in use
- Authentication-results: sourceware.org; auth=none
is it possible to get the patched cygwin1.dll for Cygwin 2.5.1? I have to support several older Win XP SP3 boxes.
Von: email@example.com [mailto:firstname.lastname@example.org] Im Auftrag von Corinna Vinschen
Gesendet: Dienstag, 6. Februar 2018 15:20
Betreff: Re: RPC clnt_create() adress already in use
On Feb 6 11:29, PAULUS, Raimund, TI-ABN wrote:
> On Feb 5 15:06, Corinna Vinschen wrote:
> > On Feb 5 14:34, Corinna Vinschen wrote:
> > > On Feb 5 12:26, Corinna Vinschen wrote:
> > > > [...]
> > > > What potential solutions to this problem do we have?
> > > >
> > > > - bindresvport could enforce SO_EXCLUSIVEADDRUSE temporarily to make
> > > > sure bind fails.
> > >
> > > Nope, no way. Even enforcing SO_EXCLUSIVEADDRUSE results in the
> > > second bind succeeding and the subsequent connect failing. The
> > > entire SO_REUSEADDR/SO_EXCLUSIVEADDRUSE semantics only works as
> > > desired on the server side apparently
> > >
> > > > - bindresvport could check every local address for being free prior
> > > > to calling bind. However, there's a potential race here.
> > > >
> > > > - DisconnectEx? Never tried this Winsock extension but it might be
> > > > worth a shot.
> > I think I have a very simple solution for the scenario which calls
> > bindresvport with port number. Still looking for a solution for the
> > second problem...
> I've pushed a few patches and uploaded new developer snapshots to
> https://cygwin.com/snapshots. Please give them a try.
> with the snapshot of cygwin1.dll and using bindresvport() from Cygwin
> for libtirpc (instead of the original bindresvport() from libtirpc)
> all my testcases work without error.
> Many thanks
Thanks for testing. Please note that this should work most of the time, but is still not 100% foolproof. There's a systematic race between checking existing connections and calling bind which can't be easily worked around by Cygwin. Still, should be better than before :}
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com