From f395a0c29b7d1e000b903abbd0c20bf17a1c506c Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Sun, 9 Jul 2017 16:03:23 +0200 Subject: [PATCH] cli: don't track device state for VPN connections Currently nmcli considers the state of the device associated to a connection to determine the success of an activation; for VPNs the device is the parent interface on which the VPN is established. This means that VPNs on bond/bridge/team interfaces are reported as connected immediately because of the special handling of master devices state in check_activated(). The parent device state is not meaningful for VPNs, so don't track it. --- clients/cli/connections.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 0f771c208..26900bd8e 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -2291,7 +2291,7 @@ activate_connection_cb (GObject *client, GAsyncResult *result, gpointer user_dat activate_connection_info_finish (info); } else { state = nm_active_connection_get_state (active); - if (!device) { + if (!device && !nm_active_connection_get_vpn (active)) { /* device could be NULL for virtual devices. Fill it here. */ ac_devs = nm_active_connection_get_devices (active); device = ac_devs->len > 0 ? g_ptr_array_index (ac_devs, 0) : NULL;