gint r;
struct dns_header *header;
+ /* If no DNS servers defined silently return FALSE */
+ if (resolver->servers_num == 0) {
+ return FALSE;
+ }
/* Check throttling */
if (resolver->throttling) {
return FALSE;
/* Parse resolv.conf */
if (! parse_resolv_conf (new) || new->servers_num == 0) {
msg_err ("cannot parse resolv.conf and no nameservers defined, so no ways to resolve addresses");
- return NULL;
+ return new;
}
}
else {
msg_err ("no valid nameservers defined, try to parse resolv.conf");
if (! parse_resolv_conf (new) || new->servers_num == 0) {
msg_err ("cannot parse resolv.conf and no nameservers defined, so no ways to resolve addresses");
- return NULL;
+ return new;
}
}