From 55eda88f17cc4192e7211d46b9a9134f4ee93d92 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Tue, 19 Sep 2017 22:00:26 +0200 Subject: ipcpd: Refuse query when DHT not in running state --- src/ipcpd/normal/dht.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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); -- cgit v1.2.3