projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not check for the daemon() system call
[tinc]
/
src
/
net.c
diff --git
a/src/net.c
b/src/net.c
index
adad410
..
c16a261
100644
(file)
--- 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.
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.
77 2000/11/20 19:12:12
guus Exp $
+ $Id: net.c,v 1.35.4.
80 2000/11/20 23:29:46
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-852,6
+852,9
@@
int setup_network_connections(void)
{
config_t const *cfg;
cp
{
config_t const *cfg;
cp
+ init_connections();
+ init_subnets();
+
if((cfg = get_config_val(config, config_pingtimeout)) == NULL)
timeout = 60;
else
if((cfg = get_config_val(config, config_pingtimeout)) == NULL)
timeout = 60;
else
@@
-1110,9
+1113,8
@@
cp
void terminate_connection(connection_t *cl)
{
connection_t *p;
void terminate_connection(connection_t *cl)
{
connection_t *p;
- subnet_t *s;
+ subnet_t *s
ubnet
;
rbl_t *rbl;
rbl_t *rbl;
-
cp
if(cl->status.remove)
return;
cp
if(cl->status.remove)
return;
@@
-1128,7
+1130,6
@@
cp
if(cl->status.meta)
close(cl->meta_socket);
if(cl->status.meta)
close(cl->meta_socket);
-cp
/* Find all connections that were lost because they were behind cl
(the connection that was dropped). */
/* Find all connections that were lost because they were behind cl
(the connection that was dropped). */
@@
-1152,7
+1153,11
@@
cp
/* Remove the associated subnets */
/* Remove the associated subnets */
- rbl_delete_rbltree(cl->subnet_tree);
+ RBL_FOREACH(cl->subnet_tree, rbl)
+ {
+ subnet = (subnet_t *)rbl->data;
+ subnet_del(subnet);
+ }
/* Check if this was our outgoing connection */
/* Check if this was our outgoing connection */