Re: connect(2) behavior with unreacheable hosts

From: Barney Wolff <barney_at_pit.databus.com>
Date: Thu, 10 Apr 2003 16:56:04 -0400
On Thu, Apr 10, 2003 at 03:45:54PM -0400, BelletJr_at_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 and 
> the value 0 is returned by connect(2).
> My test was done with TCP/IPv4.

By any chance, are you using UDP (SOCK_DGRAM) rather than TCP (SOCK_STREAM)?
That sets up data structures but sends no packets, so even if an icmp
time-exceeded will be returned when you do send packets, the problem
can't be detected yet.

-- 
Barney Wolff         http://www.databus.com/bwresume.pdf
I'm available by contract or FT, in the NYC metro area or via the 'Net.
Received on Thu Apr 10 2003 - 11:56:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:03 UTC