Re: Any way to bypass nameserver call in IPV6 ???
From: Richard D. Latham (lathamr_at_us.ibm.com)
Date: 08/27/04
- Next message: Steven Langdale: "Re: should I mirror paging space?"
- Previous message: Robin Hayes-Hall: "Re: IBM p570: Oracle9rRAC, AIX 5.2ML3 and HACMp"
- In reply to: T.R.Bennett: "Any way to bypass nameserver call in IPV6 ???"
- Next in thread: T.R.Bennett: "Re: Any way to bypass nameserver call in IPV6 ???"
- Reply: T.R.Bennett: "Re: Any way to bypass nameserver call in IPV6 ???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 Aug 2004 17:47:36 -0400
bennett.tony@cnf.com (T.R.Bennett) writes:
> Apache and several other open source projects have converted
> their code from using gethostbyname() to using getaddrinfo().
>
> They call getaddrinfo with a hints.ai_family = AF_UNSPEC,
> which means "get me both IPV4 as well as IPV6" addresses.
>
> If I were using gethostbyname(), then I could prevent going
> to the nameserver if I have the host in the /etc/hosts file
> and had /etc/netsvc.conf contain "hosts= local,bind".
>
No, you need to enter "hosts=local=auth,bind" to inform the resolver
logic that the local hosts file is authoratitive, else it will keep
checking sources in the chain until either it's asked everybody, or
someone has given an authoratitive answer.
There's also an env var you can set to get this behavior, but I can't
remember what it is right now.
> How do I create the same behaviour for IPV6 addresses ?
>
> Additionally, I noted that even though I specify a FQDN in
> the getaddrinfo() call, it tries both that name as well as
> a name created by appending my domain name. For example:
> - I specify XXX.YYY.COM
> - getaddrinfo does IPV6 queries for:
> XXX.YYY.COM
> XXX.YYY.COM.YYY.COM
> Is this correct behaviour???
>
> Thanks,
> -tony
Sorry, I'm on airplane just now and can't check, but IIRC , you need
to terminate the request string with a period '.', to prevent the
resolver logic from trying all the domains you have specified in the
/etc/"blah blah blah" file.
--
#include <disclaimer.std> /* I don't speak for IBM ... */
/* Heck, I don't even speak for myself */
/* Don't believe me ? Ask my wife :-) */
Richard D. Latham lathamr@us.ibm.com
- Next message: Steven Langdale: "Re: should I mirror paging space?"
- Previous message: Robin Hayes-Hall: "Re: IBM p570: Oracle9rRAC, AIX 5.2ML3 and HACMp"
- In reply to: T.R.Bennett: "Any way to bypass nameserver call in IPV6 ???"
- Next in thread: T.R.Bennett: "Re: Any way to bypass nameserver call in IPV6 ???"
- Reply: T.R.Bennett: "Re: Any way to bypass nameserver call in IPV6 ???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|