On Sun, Oct 02, 2005 at 01:32:48AM -0300, Nelson A. de Oliveira wrote:
> On 9/27/05, Rogier Wolff <[EMAIL PROTECTED]> wrote:
> > Yes, somehow, it calls a function that fails, but the "errno" variable
> > indicates no specification as to what system call when wrong or why: The
> > system calls all worked, just the name server told "can't resolve this".
> >
> > I agree it's confusing. I'm not familiar with the code  that
> > generates that message.
> 
> Maybe forward this to upstream and change severity to wishlist?

Well, you already have an answer from Rogier, who *is* upstream.

The weird thing is, *neither* the "Temporary failure in name resolution"
string nor the "Success" string appear anywhere in mtr source. Just about
all of the DNS code returns responses that start with "Resolver:" or
"Resolver error:" So it's a bit difficult to figure out exactly what sort of
DNS response causes that message to appear (and therefore, what code path is
being taken within mtr).

One exception to that is this chunk in mtr.c line 392ish:

#ifdef ENABLE_IPV6
  /* gethostbyname2() is deprecated so we'll use getaddrinfo() instead. */
  bzero( &hints, sizeof hints );
  hints.ai_family = af;
  hints.ai_socktype = SOCK_DGRAM;
  error = getaddrinfo( Hostname, "0", &hints, &res );
  if ( error ) {
    perror( gai_strerror(error) );
    exit( EXIT_FAILURE );
  }


I'm not sure that gai_strerror should be wrapped in perror like that - it
could be that getaddrinfo does not set errno, or it could also be that
gai_strerror resets errno. I think that a safer thing to do would be to
check if error == EAI_SYSTEM. If so, use the output from perror. If not, use
the output from gai_strerror. But never use the output from both.

To get to the bottom of it we'd need to be able to replicate the bug. Would
you be able to tell us how to configure a DNS server to be broken like yours
was?
-- 
Robert Woodcock - [EMAIL PROTECTED] 
"By metaphorically, I mean get in the car."
        -- Bender


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to