From 34337b0906ad8049d8a0ab6ef8fa2dedddf5b90c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 23 Aug 2017 12:51:52 -0600 Subject: [PATCH] wg: fix removal of psk This is an attribute of the peer, not the device. Signed-off-by: Jason A. Donenfeld --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 5bb985f..2f61d5b 100644 --- a/src/config.c +++ b/src/config.c @@ -556,7 +556,7 @@ bool config_read_cmd(struct wgdevice **device, char *argv[], int argc) if (!parse_key(peer_from_offset(buf.dev, peer_offset)->preshared_key, key_line)) goto error; } else if (ret == 1) - buf.dev->flags |= WGPEER_REMOVE_PRESHARED_KEY; + peer_from_offset(buf.dev, peer_offset)->flags |= WGPEER_REMOVE_PRESHARED_KEY; else goto error; argv += 2;