]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.c
Only keep at most 5 Address hints.
[meshlink] / src / meshlink.c
index 6e03e63bbe7e1b3848ccb8678c2a8b9fd4207d22..5d75e0688bcda7858048b57ed9d3644750f0cc6d 100644 (file)
@@ -2085,7 +2085,7 @@ void meshlink_hint_address(meshlink_handle_t *mesh, meshlink_node_t *node, const
        if(host && port) {
                xasprintf(&str, "%s %s", host, port);
                if((strncmp("fe80", host, 4) != 0) && (strncmp("127.", host, 4) != 0) && (strcmp("localhost", host) != 0))
-                       append_config_file(mesh, node->name, "Address", str);
+                       modify_config_file(mesh, node->name, "Address", str, 5);
                else
                        logger(mesh, MESHLINK_DEBUG, "Not adding Link Local IPv6 Address to config\n");
        }