summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/config.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-08-23 12:51:52 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2017-08-23 12:51:52 -0600
commit14a2b04d2732a80c896e7512c15c43db3506d0e5 (patch)
treea826e3f71e45f0359fe93a7adfcb484874419b07 /src/tools/config.c
parentsocket: improve reply-to-src algorithm (diff)
downloadwireguard-monolithic-historical-14a2b04d2732a80c896e7512c15c43db3506d0e5.tar.xz
wireguard-monolithic-historical-14a2b04d2732a80c896e7512c15c43db3506d0e5.zip
tools: fix removal of psk
This is an attribute of the peer, not the device.
Diffstat (limited to 'src/tools/config.c')
-rw-r--r--src/tools/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/config.c b/src/tools/config.c
index 5bb985f..2f61d5b 100644
--- a/src/tools/config.c
+++ b/src/tools/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;