- Henrik Stoerner fix: got a report that Tru64 Unix (the unix from Digital
when they made Alpha's) uses /etc/svc.conf for the purpose fixed below for other OSes. He made c-ares check for and understand it if present. - Now c-ares will use local host name lookup _before_ DNS resolving by default if nothing else is told.
This commit is contained in:
parent
2f89f2311c
commit
bfeea8e6b7
13
ares/CHANGES
13
ares/CHANGES
@ -1,11 +1,20 @@
|
|||||||
Changelog for the c-ares project
|
Changelog for the c-ares project
|
||||||
|
|
||||||
|
* September 29
|
||||||
|
|
||||||
|
- Henrik Stoerner fix: got a report that Tru64 Unix (the unix from Digital
|
||||||
|
when they made Alpha's) uses /etc/svc.conf for the purpose fixed below for
|
||||||
|
other OSes. He made c-ares check for and understand it if present.
|
||||||
|
|
||||||
|
- Now c-ares will use local host name lookup _before_ DNS resolving by default
|
||||||
|
if nothing else is told.
|
||||||
|
|
||||||
* September 26
|
* September 26
|
||||||
|
|
||||||
- Henrik Stoerner: found out that C-ARES does not look at the /etc/host.conf
|
- Henrik Stoerner: found out that c-ares does not look at the /etc/host.conf
|
||||||
file to determine the sequence in which to search /etc/hosts and DNS. So on
|
file to determine the sequence in which to search /etc/hosts and DNS. So on
|
||||||
systems where this order is defined by /etc/host.conf instead of a "lookup"
|
systems where this order is defined by /etc/host.conf instead of a "lookup"
|
||||||
entry in /etc/resolv.conf, C-ARES will always default to looking in DNS
|
entry in /etc/resolv.conf, c-ares will always default to looking in DNS
|
||||||
first, and /etc/hosts second.
|
first, and /etc/hosts second.
|
||||||
|
|
||||||
c-ares now looks at
|
c-ares now looks at
|
||||||
|
@ -567,6 +567,7 @@ DhcpNameServer
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
if (!channel->lookups) {
|
if (!channel->lookups) {
|
||||||
|
/* Many systems (Solaris, Linux, BSD's) use nsswitch.conf */
|
||||||
fp = fopen("/etc/nsswitch.conf", "r");
|
fp = fopen("/etc/nsswitch.conf", "r");
|
||||||
if (fp) {
|
if (fp) {
|
||||||
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
||||||
@ -577,7 +578,9 @@ DhcpNameServer
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!channel->lookups) {
|
if (!channel->lookups) {
|
||||||
|
/* Linux / GNU libc 2.x and possibly others have host.conf */
|
||||||
fp = fopen("/etc/host.conf", "r");
|
fp = fopen("/etc/host.conf", "r");
|
||||||
if (fp) {
|
if (fp) {
|
||||||
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
||||||
@ -589,6 +592,19 @@ DhcpNameServer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!channel->lookups) {
|
||||||
|
/* Tru64 uses /etc/svc.conf */
|
||||||
|
fp = fopen("/etc/svc.conf", "r");
|
||||||
|
if (fp) {
|
||||||
|
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
||||||
|
{
|
||||||
|
if ((p = try_config(line, "hosts=")) && !channel->lookups)
|
||||||
|
status = config_lookup(channel, p, "bind", "local");
|
||||||
|
}
|
||||||
|
fclose(fp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(line)
|
if(line)
|
||||||
free(line);
|
free(line);
|
||||||
}
|
}
|
||||||
@ -684,7 +700,7 @@ static int init_by_defaults(ares_channel channel)
|
|||||||
|
|
||||||
if (!channel->lookups)
|
if (!channel->lookups)
|
||||||
{
|
{
|
||||||
channel->lookups = strdup("bf");
|
channel->lookups = strdup("fb");
|
||||||
if (!channel->lookups)
|
if (!channel->lookups)
|
||||||
return ARES_ENOMEM;
|
return ARES_ENOMEM;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user