From 5f79c2c0882e03648acb9c4a2f6780a7513c61aa Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 6 Dec 2019 23:01:46 +0100 Subject: [PATCH] Remember the address used by an invitee. When a new node uses an invitation succesfully, store the address it used to connect. --- src/protocol_auth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/protocol_auth.c b/src/protocol_auth.c index e80af7d9..3676e9cb 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -165,6 +165,9 @@ static bool finalize_invitation(meshlink_handle_t *mesh, connection_t *c, const n->ecdsa = ecdsa_set_public_key(data); n->submesh = c->submesh; + // Remember its current address + node_add_recent_address(mesh, n, &c->address); + if(!node_write_config(mesh, n) || !config_sync(mesh, "current")) { logger(mesh, MESHLINK_ERROR, "Error writing configuration file for invited node %s!\n", c->name); free_node(n); -- 2.39.2