Before, the logic was to do this when the graph reported a bidirectional
edge. However, there was a possibility that if two nodes connect to each
other simultaneously, causing a second connection to be activated while the
first was also still active, which caused the REQ_KEY to not be sent.
if(!n->status.reachable) {
update_node_udp(mesh, n, NULL);
n->status.broadcast = false;
- } else if(n->connection) {
- if(n->connection->status.initiator) {
- send_req_key(mesh, n);
- }
}
if(n->utcp) {
n->last_successfull_connection = mesh->loop.now.tv_sec;
n->connection = c;
+ n->nexthop = n;
c->node = n;
/* Activate this connection */
graph(mesh);
+ /* Request a session key to jump start UDP traffic */
+
+ if(c->status.initiator) {
+ send_req_key(mesh, n);
+ }
+
return true;
}