From: Jason A. Donenfeld Date: Wed, 23 Aug 2017 18:51:52 +0000 (-0600) Subject: wg: fix removal of psk X-Git-Tag: v1.0.20191226~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34337b0906ad8049d8a0ab6ef8fa2dedddf5b90c;p=thirdparty%2Fwireguard-tools.git wg: fix removal of psk This is an attribute of the peer, not the device. Signed-off-by: Jason A. Donenfeld --- 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;