Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Apr 2003 21:20:59 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        barney@pit.databus.com
Cc:        net@freebsd.org
Subject:   Re: connect(2) behavior with unreacheable hosts
Message-ID:  <20030412.212059.42399637.imp@bsdimp.com>
In-Reply-To: <20030413030500.GA64896@pit.databus.com>
References:  <109.225ca595.2bc723f2@aol.com> <20030412.204912.76964336.imp@bsdimp.com> <20030413030500.GA64896@pit.databus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20030413030500.GA64896@pit.databus.com>
            Barney Wolff <barney@pit.databus.com> writes:
: On Sat, Apr 12, 2003 at 08:49:12PM -0600, M. Warner Losh wrote:
: > In message: <109.225ca595.2bc723f2@aol.com>
: >             BelletJr@aol.com writes:
: > : Why does not connect(2) return any error when trying to connect to a host 
: > : unreachable because of an infinite loop in the routes? No time-out occurs and 
: > : the value 0 is returned by connect(2).
: > 
: > Hmmmmm, you are correct.  I was sure that you were nuts, but on
: > -current the following program returns no error at all...  Telnet
: > shows the same behavior.  This is clearly wrong.
: 
: It's not just current; stable behaves exactly the same.  The problem is
: that the icmp time-exceeded packet gets translated into an error code
: of 0, which confuses things.  I've filed a PR with a suggested fix:
: http://www.freebsd.org/cgi/query-pr.cgi?pr=50839

Ah.  I see.  I wonder if any of the net folks can review this...

Warner


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030412.212059.42399637.imp>