- c->edge->to.udpaddress = str2sockaddr(hisaddress, hisport);
- free(hisaddress);
- free(dummy);
- c->edge->weight = (weight + c->estimated_weight) / 2;
- c->edge->connection = c;
- c->edge->options = c->options;
-cp
- edge_add(c->edge);
+ node = avl_unlink(node_udp_tree, n);
+ n->address = str2sockaddr(hisaddress, hisport);
+ avl_insert_node(node_udp_tree, node);
+ if(n->hostname)
+ free(n->hostname);
+ n->hostname = sockaddr2hostname(&n->address);
+ n->options = c->options;
+ n->distance = 1;
+ n->via = n->nexthop = n;
+ n->status.reachable = 1;
+ n->status.validkey = 0;
+ n->status.waitingforkey = 0;