X-Git-Url: http://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=fc93e9c3f8fce8e3228d03d24f6175e6c9d06a8a;hb=627f7c22b447bd464b536cd016278545674df93d;hp=ec0700c3f3e1ad1cd88126e848a442325f84f5fa;hpb=4856d8e1f8398780a49545f35ba9b5746c9fc060;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index ec0700c3..fc93e9c3 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -1,7 +1,7 @@ /* net_setup.c -- Setup. - Copyright (C) 1998-2002 Ivo Timmermans , - 2000-2002 Guus Sliepen + Copyright (C) 1998-2002 Ivo Timmermans , + 2000-2002 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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_setup.c,v 1.1.2.16 2002/06/02 16:06:33 guus Exp $ + $Id: net_setup.c,v 1.1.2.20 2002/06/21 10:11:12 guus Exp $ */ #include "config.h" @@ -26,8 +26,13 @@ #include #include #include -#ifdef HAVE_LINUX +#ifdef HAVE_NETINET_IN_SYSTM_H + #include +#endif +#ifdef HAVE_NETINET_IP_H #include +#endif +#ifdef HAVE_NETINET_TCP_H #include #endif #include @@ -479,6 +484,8 @@ cp return -1; } + listen_sockets = 0; + for(aip = ai; aip; aip = aip->ai_next) { if((listen_socket[listen_sockets].tcp = setup_listen_socket((sockaddr_t *)aip->ai_addr)) < 0)