summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-05-30 05:12:57 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-05-31 05:35:34 +0200
commite665cf562477803e27ca2621bd596b419e6aaac8 (patch)
treeca662dae3e4f67cea899d0ecd3f9a18296a3943f
parent54d591330a686ad5932447180b19c760e7f1f0be (diff)
config: do not error out when getting if no peers
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 48afae1..f3357b5 100644
--- a/src/config.c
+++ b/src/config.c
@@ -330,6 +330,7 @@ int config_get_device(struct wireguard_device *wg, void __user *user_device)
peer_data.out_len = in_device.peers_size;
peer_data.data = user_device + sizeof(struct wgdevice);
+ ret = 0;
peer_for_each (wg, peer, temp, false) {
ret = populate_peer(peer, &peer_data);
if (ret)