]> git.meshlink.io Git - meshlink/commitdiff
When activating a meta-connection, remember the address of the peer.
authorGuus Sliepen <guus@meshlink.io>
Wed, 22 Jul 2020 18:35:18 +0000 (20:35 +0200)
committerGuus Sliepen <guus@meshlink.io>
Wed, 22 Jul 2020 18:35:18 +0000 (20:35 +0200)
There was a possible situation where we did not remember the address of a
peer when there is only a TCP connection.

src/protocol_auth.c

index 2154faae09cce7cf9a305464561eaf2e9adb507f..3720e14abc64c0bf9eeb7cf71fcb927feb55f691 100644 (file)
@@ -389,6 +389,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 */