X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=320c684ff52b344dca711578cea55f561fb1944e;hp=384e878b9e96b7982e8dda33a51ce59a96a108b0;hb=e06415e3d9d08cd33c5983a2c49c4101377160c2;hpb=8910cbd67e13450e93816ecafa0cc5be5e4c2378 diff --git a/src/net.c b/src/net.c index 384e878b..320c684f 100644 --- a/src/net.c +++ b/src/net.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net.c,v 1.35.4.146 2001/11/03 21:21:04 guus Exp $ + $Id: net.c,v 1.35.4.148 2001/11/05 19:09:08 guus Exp $ */ #include "config.h" @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -250,9 +251,11 @@ int setup_listen_socket(int port) int nfd, flags; struct sockaddr_in a; int option; - char *interface; char *address; ip_mask_t *ipmask; +#ifdef HAVE_LINUX + char *interface; +#endif cp if((nfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { @@ -549,7 +552,7 @@ cp asprintf(&fname, "%s/hosts/%s", confbase, c->name); if((fp = fopen(fname, "r"))) { - c->rsa_key = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL); + c->rsa_key = PEM_read_RSAPublicKey(fp, &c->rsa_key, NULL, NULL); fclose(fp); } @@ -811,7 +814,9 @@ cp terminate_connection(myself->connection, 0); -// destroy_trees(); + close(udp_socket); + close(tcp_socket); + exit_edges(); exit_subnets(); exit_nodes();