} else {
free(ipv4);
free(conf.ifc_buf);
+ close(sock);
flog(LOG_WARNING, "could not locate an unambiguous interface for determining your public IP address - set net.publicif");
errno = ENFILE; /* XXX: There's no appropriate one for this... */
return(-1);
errno = EOPNOTSUPP;
return(NULL);
}
- /* I don't know if this is actually correct (it probably isn't),
- * but since, at on least Linux systems, PF_* are specifically
- * #define'd to their AF_* counterparts, it allows for a severely
- * smoother implementation. If it breaks something on your
- * platform, please tell me so.
- */
if(confgetint("net", "mode") == 0)
return(netcslistenlocal(type, name, namelen, func, data));
errno = EOPNOTSUPP;