[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
connect(2) behavior with unreacheable hosts
- Subject: connect(2) behavior with unreacheable hosts
- From: imp at bsdimp.com (M. Warner Losh)
- Date: Sat Apr 12 20:21:50 2003
In message: <20030413030500_(_dot_)_GA64896_(_at_)_pit_(_dot_)_databus_(_dot_)_com>
Barney Wolff <barney_(_at_)_pit_(_dot_)_databus_(_dot_)_com> writes:
: On Sat, Apr 12, 2003 at 08:49:12PM -0600, M. Warner Losh wrote:
: > In message: <109_(_dot_)_225ca595_(_dot_)_2bc723f2_(_at_)_aol_(_dot_)_com>
: > BelletJr_(_at_)_aol_(_dot_)_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
Visit your host, monkey.org