]> tinc-vpn.org Git - tinc/blobdiff - src/protocol_edge.c
Improve recently seen address cache
[tinc] / src / protocol_edge.c
index 7569e231834f047fa0a042d895d9a80b0b0412a1..d1a2d022447019af9898772988dd678d6837a165 100644 (file)
@@ -111,14 +111,12 @@ bool add_edge_h(connection_t *c, const char *request) {
        }
 
        if(!from) {
-               from = new_node();
-               from->name = xstrdup(from_name);
+               from = new_node(from_name);
                node_add(from);
        }
 
        if(!to) {
-               to = new_node();
-               to->name = xstrdup(to_name);
+               to = new_node(to_name);
                node_add(to);
        }