avoid failing hard in case of DNS configuration failure
@@ -265,7 +265,10 @@ int ipaddr_remote(struct ipaddr *addr, const char *name, int port, int mode,
if(dill_slow(!dill_dns_conf)) {
/* TODO: Maybe re-read the configuration once in a while? */
dill_dns_conf = dns_resconf_local(&rc);
- dill_assert(dill_dns_conf);
+ if(!dill_dns_conf) {
+ errno = EADDRNOTAVAIL;
+ return -1;
+ }
dill_dns_hosts = dns_hosts_local(&rc);
dill_assert(dill_dns_hosts);
dill_dns_hints = dns_hints_local(dill_dns_conf, &rc);
