Re: connect(2) behavior with unreacheable hosts

From: Don <don_at_calis.blacksun.org>
Date: Sat, 12 Apr 2003 12:52:48 -0400 (EDT)
> Thank you Terry for your instructive explanation (though Barney has found it
> seems to be a real bug ;-).
> The infinite loop that seems to exist when tracerouting happens while I try
> to access an Internet host from my provider network without having
> authenticate before. Not a usual set up, but it was just a test...
> In this case, after a few hops, traceroute seems to show packets exchanged
> indefinitely between 2 interfaces.
It is not the responsibility of TCP/UDP to report a routing problem. When
the TTL on a packet reaches 0, (Due, for example, to a routing loop) an
ICMP message is generated to report a "TTL Expired in Transit" message:
ICMP Type 11. If the host does not receive this message, then the only
thing connect() can do is timeout. In that case connect() should return -1
and errno should return [ETIMEDOUT] or [ENETUNREACH] (I have no idea which
one).

If you are allowing the necessary ICMP traffic, well, then there is a
problem. Forgive me if I have no idea what I am talking about.

-Don
Received on Sat Apr 12 2003 - 07:49:25 UTC

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