delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/09/02/05:54:37

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 2 Sep 2011 11:53:28 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Different error on socket while connecting to a box behind firewall
Message-ID: <20110902095328.GD22172@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CALRo7LvuQ_MjMw6cXC76-W4Q+MHoieRn-t=9OGTqvzSnncgmhA AT mail DOT gmail DOT com> <CALRo7LvM8ABqKntq7X1vMkhssHz1UMBmw=3FN2GFAo9paE5YuQ AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CALRo7LvM8ABqKntq7X1vMkhssHz1UMBmw=3FN2GFAo9paE5YuQ@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 Sep  2 10:16, Jaswinder Bhamra wrote:
> Since RedHat machine is behind a firewall (defined by the rules in
> 'Linux Firewall.txt') I am expecting my program to give "No route to
> host" error (shown in cyggso.out-1.5.24-2.txt file) and not "Operation
> not permitted" (shown in cyggso.out-1.7.7-1.txt file).
> 
> If anyone has encountered this issue and know the solution, can you
> please share with me.
> Not sure if it's an issue between Cygwin versions though. If it is, do
> we have any fix for this?

Not yet, but the fix will be in the next Cygwin release.  The problem is
that the conversion from a Winsock error to the corresponding POSIX
error code is accidentally called twice in the getsockopt(SO_ERROR) case.

However, even with this fix, you might not get EHOSTUNREACH either.  In
my testing, the error returned by the underlying Winsock getsockopt
function is not WSAEHOSTUNREACH, but WSAETIMEDOUT.  This will be
translated into ETIMEDOUT == "Connection timed out".

Thanks for the testcase!


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019