summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-09-19 22:00:26 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-09-19 22:00:26 +0200
commit55eda88f17cc4192e7211d46b9a9134f4ee93d92 (patch)
tree5e87237a988369e1ad9a0c4f4c1a23a6da92e777 /src
parentacd8235533d63a7e4dd4d1b5bdb17423d4b6fd75 (diff)
downloadouroboros-55eda88f17cc4192e7211d46b9a9134f4ee93d92.tar.gz
ouroboros-55eda88f17cc4192e7211d46b9a9134f4ee93d92.zip
ipcpd: Refuse query when DHT not in running state
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/normal/dht.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c
index e4c37884..351819c0 100644
--- a/src/ipcpd/normal/dht.c
+++ b/src/ipcpd/normal/dht.c
@@ -2165,6 +2165,9 @@ uint64_t dht_query(struct dht * dht,
addrs[0] = 0;
+ if (dht_get_state(dht) != DHT_RUNNING)
+ return 0;
+
pthread_rwlock_rdlock(&dht->lock);
e = dht_find_entry(dht, key);