mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-17 11:10:23 +00:00
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:
parent
318df8723a
commit
f43d9a5469
@ -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())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user