From f43d9a5469c6dd1652fc36e4f678adbe66d59766 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 16 Jan 2020 03:17:06 -0800 Subject: [PATCH] wireguard: When a connection is edited, reactivate to apply changes Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/wireguard/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plinth/modules/wireguard/utils.py b/plinth/modules/wireguard/utils.py index d6a8ec8e3..caf63417e 100644 --- a/plinth/modules/wireguard/utils.py +++ b/plinth/modules/wireguard/utils.py @@ -178,6 +178,7 @@ def edit_server(interface, settings): connection = network.get_connection_by_interface_name(interface) network.edit_connection(connection, settings) + network.reactivate_connection(connection.get_uuid()) def setup_server(): @@ -269,6 +270,7 @@ def add_client(public_key): peer.append_allowed_ip(_get_next_available_ip_address(settings), False) settings.append_peer(peer) connection.commit_changes(True) + network.reactivate_connection(connection.get_uuid()) def remove_client(public_key): @@ -282,3 +284,4 @@ def remove_client(public_key): settings.remove_peer(peer_index) connection.commit_changes(True) + network.reactivate_connection(connection.get_uuid())