mirror of
https://frontier.innolan.net/rainlance/c-ares.git
synced 2025-11-21 04:43:29 +00:00
ares_init: Last, not first instance of domain or search should win
This commit is contained in:
committed by
Daniel Stenberg
parent
0e8dc6f18e
commit
125b1a8619
3
CHANGES
3
CHANGES
@ -2,6 +2,9 @@
|
||||
|
||||
Version 1.7.1 (Mar 23, 2010)
|
||||
|
||||
* May 31, 2010 (Jakub Hrozek)
|
||||
- Use the last instance of domain/search, not the first one
|
||||
|
||||
* March 23, 2010 (Daniel Stenberg)
|
||||
- We switched from CVS to git. See http://github.com/bagder/c-ares
|
||||
|
||||
|
||||
23
ares_init.3
23
ares_init.3
@ -109,7 +109,7 @@ or the domain derived from the kernel hostname variable.
|
||||
.B ARES_OPT_LOOKUPS
|
||||
.B char *\fIlookups\fP;
|
||||
.br
|
||||
The lookups to perform for host queries.
|
||||
The lookups to perform for host queries.
|
||||
.I lookups
|
||||
should be set to a string of the characters "b" or "f", where "b"
|
||||
indicates a DNS lookup and "f" indicates a lookup in the hosts file.
|
||||
@ -189,6 +189,27 @@ The process's available memory was exhausted.
|
||||
.TP 14
|
||||
.B ARES_ENOTINITIALIZED
|
||||
c-ares library initialization not yet performed.
|
||||
.SH NOTES
|
||||
When initializing from
|
||||
.B /etc/resolv.conf,
|
||||
.BR ares_init (3)
|
||||
reads the
|
||||
.I domain
|
||||
and
|
||||
.I search
|
||||
directives to allow lookups of short names relative to the domains
|
||||
specified. The
|
||||
.I domain
|
||||
and
|
||||
.I search
|
||||
directives override one another. If more that one instance of either
|
||||
.I domain
|
||||
or
|
||||
.I search
|
||||
directives is specified, the last occurence wins. For more information,
|
||||
please see the
|
||||
.BR resolv.conf (5)
|
||||
manual page.
|
||||
.SH SEE ALSO
|
||||
.BR ares_destroy(3),
|
||||
.BR ares_dup(3),
|
||||
|
||||
@ -839,11 +839,11 @@ DhcpNameServer
|
||||
if (fp) {
|
||||
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
||||
{
|
||||
if ((p = try_config(line, "domain")) && channel->ndomains == -1)
|
||||
if ((p = try_config(line, "domain")))
|
||||
status = config_domain(channel, p);
|
||||
else if ((p = try_config(line, "lookup")) && !channel->lookups)
|
||||
status = config_lookup(channel, p, "bind", "file");
|
||||
else if ((p = try_config(line, "search")) && channel->ndomains == -1)
|
||||
else if ((p = try_config(line, "search")))
|
||||
status = set_search(channel, p);
|
||||
else if ((p = try_config(line, "nameserver")) && channel->nservers == -1)
|
||||
status = config_nameserver(&servers, &nservers, p);
|
||||
|
||||
Reference in New Issue
Block a user