Nodes should only be in the node_udp_tree if they are reachable.
[tinc] / src / node.c
index 79320e7..9f1a78a 100644 (file)
@@ -1,7 +1,7 @@
 /*
     node.c -- node tree management
-    Copyright (C) 2001-2003 Guus Sliepen <guus@sliepen.eu.org>,
-                  2001-2003 Ivo Timmermans <ivo@o2w.nl>
+    Copyright (C) 2001-2004 Guus Sliepen <guus@tinc-vpn.org>,
+                  2001-2004 Ivo Timmermans <ivo@tinc-vpn.org>
 
     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: node.c,v 1.1.2.31 2003/12/22 11:04:16 guus Exp $
+    $Id$
 */
 
 #include "system.h"
@@ -123,7 +123,6 @@ void node_add(node_t *n)
        cp();
 
        avl_insert(node_tree, n);
-       avl_insert(node_udp_tree, n);
 }
 
 void node_del(node_t *n)
@@ -147,29 +146,6 @@ void node_del(node_t *n)
        }
 
        avl_delete(node_tree, n);
-       avl_delete(node_udp_tree, n);
-}
-
-void update_node_address(node_t *n, const sockaddr_t address) {
-       avl_node_t *node;
-
-       node = avl_unlink(node_udp_tree, n);
-       sockaddrfree(&n->address);
-       sockaddrcpy(&n->address, &address);
-
-       if(n->hostname)
-               free(n->hostname);
-
-       n->hostname = sockaddr2hostname(&n->address);
-       avl_insert_node(node_udp_tree, node);
-
-       if(n->options & OPTION_PMTU_DISCOVERY) {
-               n->mtuprobes = 0;
-               n->minmtu = 0;
-               n->maxmtu = MTU;
-               if(n->status.validkey)
-                       send_mtu_probe(n);
-       }
 }
 
 node_t *lookup_node(char *name)