Date: Fri, 21 Apr 2000 09:39:12 +0900 From: Yoshinobu Inoue <shin@nd.net.fujitsu.co.jp> To: green@FreeBSD.org Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/net getaddrinfo.c name6.c Message-ID: <20000421093912D.shin@nd.net.fujitsu.co.jp> In-Reply-To: <Pine.BSF.4.21.0004201912480.20816-100000@green.dyndns.org> References: <200004200331.UAA85800@freefall.freebsd.org> <Pine.BSF.4.21.0004201912480.20816-100000@green.dyndns.org>
index | next in thread | previous in thread | raw e-mail
> > Log:
> > Change getaddrinfo() resolve order
> > from
> > all AAAA trial, then all A trial
> > to
> > try AAAA and A for each trial
Sorry to be late to fix this.
(It still needs some improvements but I committed it because
many people seems to have problem with this.)
> I wanted to change this myself, but I didn't feel like getting involved
> with the getaddrinfo() code too well (I like my sanity, and not the
> getaddrinfo() code ;). However, I have done the work for the
> gethostbyname() family. Would you like to review it? Diffs are small,
> so included.
I have one question about the patches.
> -static struct hostent *
> -gethostbyname_internal(const char *name, int type, int doinet6first)
> +struct hostent *
> +gethostbyname2(const char *name, int type)
> {
> struct hostent *hp = 0;
> int nserv = 0;
> - int dohost6first, dobind6first;
> -
> - if (doinet6first)
> - dohost6first = dobind6first = 1;
> - else
> - dohost6first = dobind6first = 0;
>
> if (!service_done)
> init_services();
> @@ -149,19 +145,9 @@
> case SERVICE_NONE:
> return NULL;
> case SERVICE_HOSTS:
> - if (dohost6first) {
> - dohost6first = 0;
> - hp = _gethostbyhtname(name, AF_INET6);
> - continue;
> - }
> hp = _gethostbyhtname(name, type);
> break;
> case SERVICE_BIND:
> - if (dobind6first) {
> - dobind6first = 0;
> - hp = _gethostbydnsname(name, AF_INET6);
> - continue;
> - }
> hp = _gethostbydnsname(name, type);
> break;
What "type" value is supposed in doinet6first case?
I suppose that someone is calling
gethostbyname_internal(name, AF_INET, 1)
at somewhere, but the part of diff seems to be missing.
Thanks,
Yoshinobu Inoue
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000421093912D.shin>
