X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fnet.c;h=3cd12dca8a322d2c9443d8e4c5126e42edf69948;hb=2dd01e6ee102502c267d582a7037014bbd5d36f7;hp=0f7be541cf4b82c1b27f8c74d3e14c82ff587fb2;hpb=0a1bc5b19fe40d88790d02f236ea4c9637024969;p=doldaconnect.git diff --git a/daemon/net.c b/daemon/net.c index 0f7be54..3cd12dc 100644 --- a/daemon/net.c +++ b/daemon/net.c @@ -33,7 +33,6 @@ #include #include #include -#include #ifdef HAVE_LINUX_SOCKIOS_H #include #endif @@ -129,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); @@ -593,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;