return false;
}
- return send_request(mesh, c, "%d %s %d.%d", ID, mesh->self->connection->name, mesh->self->connection->protocol_major, minor);
+ return send_request(mesh, c, "%d %s %d.%d %s", ID, mesh->self->connection->name, mesh->self->connection->protocol_major, minor, mesh->appname);
}
static bool finalize_invitation(meshlink_handle_t *mesh, connection_t *c, const void *data, uint16_t len) {
}
}
+ bool blacklisted = false;
+ get_config_bool(lookup_config(c->config_tree, "blacklisted"), &blacklisted);
+
+ if(blacklisted) {
+ logger(mesh, MESHLINK_EPEER, "Peer %s is blacklisted", c->name);
+ return false;
+ }
+
read_ecdsa_public_key(mesh, c);
if(!ecdsa_active(c->ecdsa)) {
node_t *n = lookup_node(mesh, c->name);
- if(n && !n->status.waitingforkey) {
+ if(n && n->status.reachable && !n->status.waitingforkey) {
logger(mesh, MESHLINK_INFO, "Requesting key from peer %s", c->name);
send_req_key(mesh, n);
}
for splay_each(node_t, n, mesh->nodes) {
for splay_each(edge_t, e, n->edge_tree) {
- send_add_edge(mesh, c, e);
+ send_add_edge(mesh, c, e, 0);
}
}
}
/* Notify everyone of the new edge */
- send_add_edge(mesh, mesh->everyone, c->edge);
+ send_add_edge(mesh, mesh->everyone, c->edge, 0);
/* Run MST and SSSP algorithms */