Re: happy eyesockets

[email protected] (Michael van Elst)
Newsgroups gmane.os.netbsd.devel.network
Organization Serpens User Group
Message-ID <[email protected]>
[email protected] (Greg Troxel) writes:

>"Jonathan A. Kollasch" <[email protected]> writes:

>> Attached is a patch to actually treat ICMP(v6) host/net/port unreachables
>> during TCP establishment in a way that doesn't cause ~75 second delays
>> waiting for multiple retransmits to all be reported as unreachable before
>> actually letting getaddrinfo(3) fall back to the next address.
>>
>> Linux seems to handle this like this already.

>I don't object and I think you have a good point, but what do the
>standards say?


RFC1122 describes how to handle ICMP messages and distinguishes
between soft errors (event gets registered, but protocol continues)
and hard errors (a TCP connection is aborted).

Hard errors would be a destination unreachable code 2-4 (bad protocol,
bad port, need fragmentation). The RFC explictely forbids to abort
the connection on code 0,1,5 (net unreachable, host unreachable,
source routing failed).

We translate code 2 and 3 to ECONNREFUSED, code 4 to EMSGSIZE, code 0
to  and code 0,1 and 5 to EHOSTUNREACH.

ENETUNREACH is not the result of an ICMP error, but of a missing
route.

The ICMP6 codes are somewhat different, and there are more RFCs that
apply. It also knows a condition signaled with EHOSTDOWN as a result
of a destination unreachable ICMP6 code 3.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.