diff options
author | Dimitri Staessens <[email protected]> | 2018-01-23 01:18:09 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2018-01-23 10:28:52 +0100 |
commit | 33e88c2bae0aa76ee23056429abe9514160a3c95 (patch) | |
tree | 243cb410262b5fc4c05e508cdb71b2ede0e9d667 /src/ipcpd/normal | |
parent | 2deb654dc58eb2c25d15b2292366e321e475fb69 (diff) | |
download | ouroboros-5a255d708a09326a0179a47be3a0097763ca6211.tar.gz ouroboros-5a255d708a09326a0179a47be3a0097763ca6211.zip |
ipcpd: Fix lookup handling in DHT0.9.3
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 <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r-- | src/ipcpd/normal/dht.c | 7 |
1 files 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); |