[PATCH 2/2] netdev: reset peer keys when changing private key
derrick at pallas.us
derrick at pallas.us
Wed Mar 13 23:46:43 CET 2019
From: Derrick Pallas <derrick at pallas.us>
Without this change, it can take until the handshake timeout period to
reestablish with the peer. After this change, the handshake occurs as soon
as possible and the link is reestablished much more quickly.
Signed-off-by: Derrick Pallas <derrick at pallas.us>
---
src/netlink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/netlink.c b/src/netlink.c
index b179b31..43e1e05 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -551,6 +551,8 @@ static int wg_set_device(struct sk_buff *skb, struct genl_info *info)
peer_list) {
if (!wg_noise_precompute_static_static(peer))
wg_peer_remove(peer);
+ else
+ wg_peer_reset_keys(peer);
}
wg_cookie_checker_precompute_device_keys(&wg->cookie_checker);
up_write(&wg->static_identity.lock);
--
2.19.2
More information about the WireGuard
mailing list