[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] IPv6-ifying nmh

From: Robert Elz
Subject: Re: [Nmh-workers] IPv6-ifying nmh
Date: Tue, 13 Jan 2009 11:09:09 +0700

    Date:        Mon, 12 Jan 2009 10:52:00 -0500
    From:        Ken Hornstein <address@hidden>
    Message-ID:  <address@hidden>

  | I don't know what the issue is here, but I think the key is to try all
  | of the addresses returned by getaddrinfo().

What's probably most important is to not issue bogus error messages.

That is, if getaddrinfo() returns a v6 address, but connecting to
it fails (after which you go on to try a v4 address perhaps, which
also fails) the common practice of reporting the first detected error
is often what causes problems.

Not to the application, if any address works, no error is reported, and
everyone is happy, but to the sanity of the user, who often tends to
see an error message reporting v6 failures when they never expected v6
to work for them - but getaddrinfo() happened to return a v6 address first.

That causes people to waste lots of time debugging the wrong problem
(the real issue in the postulated case isn't why the v6 connect() failed,
but why the later v4 connect() didn't work).

Doing this well is not at all easy, sometimes the best course is to
simply note "unable to connect to domain.name" and 'forget' to mention
the IP address (any IP address of any version) and omit the strerror()
explanation for why the connect failed (because guessing which of the several
errno values that ended up being seen is the one the user needs to know
about is just that - guessing).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]