- for(p = conn_list; p; p = p->next)
- if(p->status.meta && p->status.active && p!= cl)
- send_add_subnet(p, subnet);
+ if(n)
+ {
+ /* Check if it matches */
+
+ if(n->address != address || n->port != port)
+ syslog(LOG_DEBUG, _("Got %s from %s (%s) for %s which does not match existing entry"), "ADD_NODE", c->name, c->hostname, n->name);
+
+ return 0;
+ }
+ else
+ {
+ n = new_node();
+ n->name = xstrdup(name);
+ n->address = address;
+ n->port = port;
+ node_add(n);
+ }
+
+ /* Tell the rest about the new node */
+
+ for(node = connection_tree->head; node; node = node->next)
+ {
+ other = (connection_t *)node->data;
+ if(other->status.active && other !=c)
+ send_add_node(other, n);
+ }
+