From: Guus Sliepen Date: Tue, 20 Nov 2018 15:01:12 +0000 (+0100) Subject: Fix a potential segfault. X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=ae73e19ce57b80c561b81170ab48f3cf6f1a41eb Fix a potential segfault. This was found by Lakshminarayana Gurram. --- diff --git a/src/protocol_auth.c b/src/protocol_auth.c index e56aa881..487f34c9 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -402,7 +402,7 @@ bool id_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { node_t *n = lookup_node(mesh, c->name); - if(n && !n->status.waitingforkey) { + if(n && n->status.reachable && !n->status.waitingforkey) { logger(mesh, MESHLINK_INFO, "Requesting key from peer %s", c->name); send_req_key(mesh, n); }