diff options
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/netlink.c b/src/netlink.c index c61657c..2f5157d 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -435,12 +435,14 @@ static int set_device(struct sk_buff *skb, struct genl_info *info) } } + down_write(&wg->static_identity.lock); noise_set_static_identity_private_key(&wg->static_identity, private_key); list_for_each_entry_safe(peer, temp, &wg->peer_list, peer_list) { if (!noise_precompute_static_static(peer)) peer_remove(peer); } cookie_checker_precompute_device_keys(&wg->cookie_checker); + up_write(&wg->static_identity.lock); } if (info->attrs[WGDEVICE_A_PEERS]) { |