From ae73e19ce57b80c561b81170ab48f3cf6f1a41eb Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Tue, 20 Nov 2018 16:01:12 +0100 Subject: [PATCH] Fix a potential segfault. This was found by Lakshminarayana Gurram. --- src/protocol_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.39.2