wireguard: When a connection is edited, reactivate to apply changes

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-01-16 03:17:06 -08:00 committed by James Valleroy
parent 318df8723a
commit f43d9a5469
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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())