X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=4165bb1b987cfbfa4dae0d5362a8137ef7eeaece;hp=2154faae09cce7cf9a305464561eaf2e9adb507f;hb=61ab7adcdb4ac160e57ef7b22f56df9676b6381d;hpb=b2d1ccdaf1554f2f34e8acb86f89190cb93b6634 diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 2154faae..4165bb1b 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -360,6 +360,7 @@ bool ack_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { n->last_successfull_connection = mesh->loop.now.tv_sec; n->connection = c; + n->nexthop = n; c->node = n; /* Activate this connection */ @@ -389,6 +390,7 @@ bool ack_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { c->edge->weight = mesh->dev_class_traits[devclass].edge_weight; c->edge->connection = c; + node_add_recent_address(mesh, n, &c->address); edge_add(mesh, c->edge); /* Notify everyone of the new edge */ @@ -399,5 +401,11 @@ bool ack_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { graph(mesh); + /* Request a session key to jump start UDP traffic */ + + if(c->status.initiator) { + send_req_key(mesh, n); + } + return true; }