summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-06-23 22:46:02 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2016-06-28 16:24:16 +0200
commit19133b08daf97fedeeb3bd9d76bb8e58f87951a4 (patch)
tree5128f5fa702a40a9c2f611f4d19213b3f4a459f9
parentfdecb6b6691e176bbc1bcce3ccac6f08d800ed59 (diff)
downloadNetworkManager-19133b08daf97fedeeb3bd9d76bb8e58f87951a4.tar.gz
vpn: dispatch pre-up scripts only once
If the plugin sends a new configuration when the connection is already activated the state should not go back to PRE_UP since this causes dispatcher scripts to run again.
-rw-r--r--src/vpn-manager/nm-vpn-connection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
index b2aa8f6bc6..84021d3c28 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -1082,7 +1082,8 @@ nm_vpn_connection_apply_config (NMVpnConnection *self)
nm_default_route_manager_ip6_update_default_route (priv->default_route_manager, self);
_LOGI ("VPN connection: (IP Config Get) complete");
- _set_vpn_state (self, STATE_PRE_UP, NM_VPN_CONNECTION_STATE_REASON_NONE, FALSE);
+ if (priv->vpn_state < STATE_PRE_UP)
+ _set_vpn_state (self, STATE_PRE_UP, NM_VPN_CONNECTION_STATE_REASON_NONE, FALSE);
return TRUE;
}