summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-07-09 16:03:23 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2017-07-09 16:10:54 +0200
commitf395a0c29b7d1e000b903abbd0c20bf17a1c506c (patch)
tree8eafab81aba80a264bc846c9a00ec9b6e1ecbd52
parentb535ecc23ace1b1bfb85536f95bc84fbab8c0276 (diff)
downloadNetworkManager-f395a0c29b7d1e000b903abbd0c20bf17a1c506c.tar.gz
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.
-rw-r--r--clients/cli/connections.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 0f771c2084..26900bd8e1 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;