Commit 98a0bb19 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix loading of dns server address on android. Getting an error on one doesn't...

fix loading of dns server address on android. Getting an error on one doesn't mean we have to ignore all the others that worked.
parent 5bba07f3
......@@ -4332,10 +4332,13 @@ int dns_resconf_loadandroid(struct dns_resolv_conf *resconf) {
int error = 0;
int i;
for (i = 1; !error && (i <= lengthof(resconf->nameserver)); i++, sa_count++) {
for (i = 1; !error && (i <= lengthof(resconf->nameserver)); i++) {
snprintf(prop_name, sizeof(prop_name), "net.dns%d", i);
if (__system_property_get(prop_name, dns) > 0) {
error = dns_resconf_pton(&resconf->nameserver[sa_count], dns);
/*if the prop value contains IPv6 address with %wlan0 (link local ipv6), it will fail but no matter*/
if (dns_resconf_pton(&resconf->nameserver[sa_count], dns) == 0){
sa_count++;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment