From e665cf562477803e27ca2621bd596b419e6aaac8 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 30 May 2017 05:12:57 +0200 Subject: config: do not error out when getting if no peers Signed-off-by: Jason A. Donenfeld --- src/config.c | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v1.2.3