On Sun, Oct 02, 2005 at 08:54:49AM -0700, Robert Woodcock wrote:
> 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, It certainly looks as if code like this is the culprit. Yes, the
"Success" string comes from 
        errno = 0;
        perror (....);

        Roger. 


> -- 
> Robert Woodcock - [EMAIL PROTECTED] 
> "By metaphorically, I mean get in the car."
>       -- Bender

-- 
** [EMAIL PROTECTED] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. 
Does it sit on the couch all day? Is it unemployed? Please be specific! 
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ


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

Reply via email to