mirror of https://github.com/getdnsapi/getdns.git
Merge pull request #139 from ln5/parsing-resolvconf
Don't treat "domain" or "search" as a nameserver. Thank you Linus
This commit is contained in:
commit
60be402062
|
@ -952,8 +952,9 @@ set_os_defaults(struct getdns_context *context)
|
||||||
*token = 0;
|
*token = 0;
|
||||||
|
|
||||||
(void) strlcpy(domain, parse, sizeof(domain));
|
(void) strlcpy(domain, parse, sizeof(domain));
|
||||||
|
continue;
|
||||||
} else if (strncmp(parse, "search", 6) == 0) {
|
}
|
||||||
|
if (strncmp(parse, "search", 6) == 0) {
|
||||||
parse += 6;
|
parse += 6;
|
||||||
do {
|
do {
|
||||||
parse += strspn(parse, " \t");
|
parse += strspn(parse, " \t");
|
||||||
|
@ -967,8 +968,9 @@ set_os_defaults(struct getdns_context *context)
|
||||||
*token = prev_ch;
|
*token = prev_ch;
|
||||||
parse = token;
|
parse = token;
|
||||||
} while (*parse);
|
} while (*parse);
|
||||||
|
continue;
|
||||||
} else if (strncmp(parse, "nameserver", 10) != 0)
|
}
|
||||||
|
if (strncmp(parse, "nameserver", 10) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
parse += 10;
|
parse += 10;
|
||||||
|
|
Loading…
Reference in New Issue