aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-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;