diff options
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/netlink.c b/src/netlink.c index 9bf2f84..4392f7b 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -567,10 +567,8 @@ static int wg_set_device(struct sk_buff *skb, struct genl_info *info) private_key); list_for_each_entry_safe(peer, temp, &wg->peer_list, peer_list) { - if (wg_noise_precompute_static_static(peer)) - wg_noise_expire_current_peer_keypairs(peer); - else - wg_peer_remove(peer); + BUG_ON(!wg_noise_precompute_static_static(peer)); + wg_noise_expire_current_peer_keypairs(peer); } wg_cookie_checker_precompute_device_keys(&wg->cookie_checker); up_write(&wg->static_identity.lock); |