X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fnet.c;h=3cd12dca8a322d2c9443d8e4c5126e42edf69948;hb=2dd01e6ee102502c267d582a7037014bbd5d36f7;hp=4fee86ce9f043c4d399383acf297eea6e49f33e8;hpb=4b939ad5aed6dc597346da3f45ce61832133abe3;p=doldaconnect.git diff --git a/daemon/net.c b/daemon/net.c index 4fee86c..3cd12dc 100644 --- a/daemon/net.c +++ b/daemon/net.c @@ -128,6 +128,7 @@ int getpublicaddr(int af, struct sockaddr **addr, socklen_t *lenbuf) } 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); @@ -592,12 +593,6 @@ struct socket *netcslisten(int type, struct sockaddr *name, socklen_t namelen, v 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;