projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a simple Random Early Drop algorithm in send_tcppacket().
[tinc]
/
src
/
node.c
diff --git
a/src/node.c
b/src/node.c
index
3519916
..
4ee9ce7
100644
(file)
--- a/
src/node.c
+++ b/
src/node.c
@@
-1,7
+1,7
@@
/*
node.c -- node tree management
/*
node.c -- node tree management
- Copyright (C) 2001-200
3 Guus Sliepen <guus@sliepen.eu
.org>,
- 2001-200
3 Ivo Timmermans <ivo@o2w.nl>
+ Copyright (C) 2001-200
9 Guus Sliepen <guus@tinc-vpn
.org>,
+ 2001-200
5 Ivo Timmermans
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
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.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id
: node.c,v 1.1.2.31 2003/12/22 11:04:16 guus Exp
$
+ $Id$
*/
#include "system.h"
*/
#include "system.h"
@@
-78,7
+78,6
@@
node_t *new_node(void)
n->subnet_tree = new_subnet_tree();
n->edge_tree = new_edge_tree();
n->subnet_tree = new_subnet_tree();
n->edge_tree = new_edge_tree();
- n->queue = list_alloc((list_action_t) free);
EVP_CIPHER_CTX_init(&n->packet_ctx);
n->mtu = MTU;
n->maxmtu = MTU;
EVP_CIPHER_CTX_init(&n->packet_ctx);
n->mtu = MTU;
n->maxmtu = MTU;
@@
-90,15
+89,6
@@
void free_node(node_t *n)
{
cp();
{
cp();
- if(n->queue)
- list_delete_list(n->queue);
-
- if(n->name)
- free(n->name);
-
- if(n->hostname)
- free(n->hostname);
-
if(n->key)
free(n->key);
if(n->key)
free(n->key);
@@
-115,6
+105,12
@@
void free_node(node_t *n)
if(n->mtuevent)
event_del(n->mtuevent);
if(n->mtuevent)
event_del(n->mtuevent);
+ if(n->hostname)
+ free(n->hostname);
+
+ if(n->name)
+ free(n->name);
+
free(n);
}
free(n);
}
@@
-123,7
+119,6
@@
void node_add(node_t *n)
cp();
avl_insert(node_tree, n);
cp();
avl_insert(node_tree, n);
- avl_insert(node_udp_tree, n);
}
void node_del(node_t *n)
}
void node_del(node_t *n)
@@
-147,7
+142,6
@@
void node_del(node_t *n)
}
avl_delete(node_tree, n);
}
avl_delete(node_tree, n);
- avl_delete(node_udp_tree, n);
}
node_t *lookup_node(char *name)
}
node_t *lookup_node(char *name)