wg: fix removal of psk

This is an attribute of the peer, not the device.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2017-08-23 12:51:52 -06:00
parent bc9494f8b6
commit 34337b0906
1 changed files with 1 additions and 1 deletions

View File

@ -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;