mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
network: Fix activating connections that don't have real devices
When a WireGuard connection is activated, it create the wireguard interface. Looking for matching devices before activating a connection will then fail. Use get_all_devices() API to get the list of all devices that are real and those that will be created due to connection activation. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
25317700c2
commit
68e5684d10
@ -486,7 +486,7 @@ def activate_connection(connection_uuid):
|
||||
connection = get_connection(connection_uuid)
|
||||
interface = connection.get_interface_name()
|
||||
client = get_nm_client()
|
||||
for device in client.get_devices():
|
||||
for device in client.get_all_devices():
|
||||
if device.get_iface() == interface:
|
||||
client.activate_connection_async(connection, device, '/', None,
|
||||
_callback, None)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user