From 5c5bdd05e17f8758e2ccca9d31c47d73cb1fd148 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 14 Aug 2017 21:24:57 +0200 Subject: [PATCH] Remember recently used addresses of other nodes. --- src/node.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node.c b/src/node.c index f55ff370..af02fe27 100644 --- a/src/node.c +++ b/src/node.c @@ -126,7 +126,9 @@ void update_node_udp(meshlink_handle_t *mesh, node_t *n, const sockaddr_t *sa) { } hash_insert(mesh->node_udp_cache, sa, n); free(n->hostname); + n->hostname = sockaddr2hostname(&n->address); + meshlink_hint_address(mesh, (meshlink_node_t *)n, &sa->sa); logger(mesh, MESHLINK_DEBUG, "UDP address of %s set to %s", n->name, n->hostname); } } -- 2.39.5