Date: Fri, 11 Apr 2003 13:14:15 EDT From: BelletJr@aol.com To: tlambert2@mindspring.com Cc: net@freebsd.org Subject: Re: connect(2) behavior with unreacheable hosts Message-ID: <1dc.74b8b15.2bc851e7@aol.com>
next in thread | raw e-mail | index | archive | help
>Dans un e-mail dat=E9 du 11/04/03 00:23:16 Paris, Madrid (Heure d'=E9t=E9),= =20 tlambert2@mindspring.com a =E9crit : > >BelletJr@aol.com wrote: >> 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= =20 and >> the value 0 is returned by connect(2). >> My test was done with TCP/IPv4. > >Because it can't detect an infinite routing loop. Then why can't it detect an infinite routing loop? :) It does not implement=20 the classic three-way handshake of a TCP connection establishment?? If this is the case, I think the man page is not precise enough. It states=20 "If the socket is of type SOCK_STREAM, this call attempts to make a=20 connection to another socket" and later on "The connect() function returns=20 the value 0 if successful". BTW we can imagine that the majority of programs aren't crafted to handle=20 this case. Have a look for example to the simple "daytime.c" program from th= e=20 developper handbook. It just doesn't do anything if time.nist.gov is=20 unreachable because of an infinite routing loop. Jerome
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1dc.74b8b15.2bc851e7>