Merge pull request #251
c0de96f
Fixed DNS resolution bug in Windows (Thomas Winget)
This commit is contained in:
commit
ea32a84e45
1
external/unbound/libunbound/libunbound.c
vendored
1
external/unbound/libunbound/libunbound.c
vendored
@ -1028,7 +1028,6 @@ ub_ctx_hosts(struct ub_ctx* ctx, const char* fname)
|
|||||||
"\\hosts");
|
"\\hosts");
|
||||||
retval=ub_ctx_hosts(ctx, buf);
|
retval=ub_ctx_hosts(ctx, buf);
|
||||||
}
|
}
|
||||||
free(name);
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
return UB_READFILE;
|
return UB_READFILE;
|
||||||
|
@ -162,11 +162,9 @@ DNSResolver::DNSResolver() : m_data(new DNSResolverData())
|
|||||||
// init libunbound context
|
// init libunbound context
|
||||||
m_data->m_ub_context = ub_ctx_create();
|
m_data->m_ub_context = ub_ctx_create();
|
||||||
|
|
||||||
char empty_string = '\0';
|
|
||||||
|
|
||||||
// look for "/etc/resolv.conf" and "/etc/hosts" or platform equivalent
|
// look for "/etc/resolv.conf" and "/etc/hosts" or platform equivalent
|
||||||
ub_ctx_resolvconf(m_data->m_ub_context, &empty_string);
|
ub_ctx_resolvconf(m_data->m_ub_context, NULL);
|
||||||
ub_ctx_hosts(m_data->m_ub_context, &empty_string);
|
ub_ctx_hosts(m_data->m_ub_context, NULL);
|
||||||
|
|
||||||
ub_ctx_add_ta(m_data->m_ub_context, ::get_builtin_ds());
|
ub_ctx_add_ta(m_data->m_ub_context, ::get_builtin_ds());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user