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

Re: Pb de resolution de localhost



On Tuesday 17 February 2009 23:03:20 giggz wrote:
> Bruno Muller a écrit :
> > Hello,
> >
> > Le mardi 17 février 2009 à 17:17 +0100, giggz a écrit :
> >> pourquoi le fichier /etc/hosts ne sert il pas ?
> >
> > Il sert.
> >
> > Mais getaddrinfo() doit, selon ses spec, retourner *toutes* les adresses
> > IP (v4 et v6) correspondants à l'hôte demandé.
> > Et pour les retourner toutes, il doit chercher partout !
> >
> > Et, à priori, tu n'as pas d'IPV6 correspondant à localhost d'indiqué
> > dans /etc/hosts...
> >
> > Peut-être qu'il y a d'autres solutions (de contournement) en plus des 2
> > que j'ai proposé :
> > - Ajouter une ligne "::1 localhost" dans /etc/hosts
> > - Déactiver complètement l'ipv6 (décharger/blacklister le module ipv6)
>
> Ok je teste ça de suite!
>
> juste pour savoir ça fait en quoi en plus de :
> ::1 ip6-localhost ip6-loopback

Cela revient à ajouter localhost à la fin. Tu dis juste que localhost, ip6-
localhost et ip6-loopback sont équivalent à ::1

>
> merci en tout cas!
>
> > Les dév de la glibc savent qu'il peut y avoir problème (fichier BUGS
> > dans les sources de la glibc) :
> >
> > [  *]  Some of the functions which also handled IPv6 are currently
> > broken. IPv6 and IPv4 lookups occasionally happen when not needed.  This
> > happens in getaddrinfo() and getnameinfo().  IPv4 handling of these
> > functions is OK though and there are patches available to fix the IPv6
> > code as well.
> >
> >
> > Bruno

Cordialement,

Thomas Preud'homme


Reply to: