From 33e88c2bae0aa76ee23056429abe9514160a3c95 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Tue, 23 Jan 2018 01:18:09 +0100 Subject: ipcpd: Fix lookup handling in DHT Some responses for a query were missed because the lookup went into LU_COMPLETE state while still having pending requests. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/normal/dht.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c index 7e91d7ad..a59b7781 100644 --- a/src/ipcpd/normal/dht.c +++ b/src/ipcpd/normal/dht.c @@ -1669,11 +1669,8 @@ static struct lookup * kad_lookup(struct dht * dht, switch (state) { case LU_UPDATE: lookup_new_addrs(lu, addrs); - if (addrs[0] == 0) { - lookup_detach(dht, lu); - lookup_set_state(lu, LU_COMPLETE); - return lu; - } + if (addrs[0] == 0) + break; out = kad_find(dht, id, addrs, code); lookup_add_out(lu, out); -- cgit v1.2.3