mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 17:30:16 +01:00
vpn-manager: ignore ip configs from disconnected plugins
Plugins could be already failed or disconnected when the helper fires. E.g. they could send in an invalid IP4Config that would cause them to fail and then follow with an IP6Config before they realize it's of no use. We'd hit an assertion failure in that case, because the NMVpnConnection would already be cleaned up.
This commit is contained in:
parent
0f867d31c1
commit
bf70ed2e86
1 changed files with 10 additions and 0 deletions
|
|
@ -1408,6 +1408,11 @@ nm_vpn_connection_ip4_config_get (NMVpnConnection *self, GVariant *dict)
|
|||
if (priv->vpn_state == STATE_CONNECT)
|
||||
_set_vpn_state (self, STATE_IP_CONFIG_GET, NM_VPN_CONNECTION_STATE_REASON_NONE, FALSE);
|
||||
|
||||
if (priv->vpn_state > STATE_ACTIVATED) {
|
||||
_LOGI ("VPN connection: (IP4 Config Get) ignoring, the connection is no longer active");
|
||||
return;
|
||||
}
|
||||
|
||||
if (priv->has_ip4) {
|
||||
_LOGI ("VPN connection: (IP4 Config Get) reply received");
|
||||
|
||||
|
|
@ -1577,6 +1582,11 @@ nm_vpn_connection_ip6_config_get (NMVpnConnection *self, GVariant *dict)
|
|||
if (priv->vpn_state == STATE_CONNECT)
|
||||
_set_vpn_state (self, STATE_IP_CONFIG_GET, NM_VPN_CONNECTION_STATE_REASON_NONE, FALSE);
|
||||
|
||||
if (priv->vpn_state > STATE_ACTIVATED) {
|
||||
_LOGI ("VPN connection: (IP6 Config Get) ignoring, the connection is no longer active");
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_variant_n_children (dict) == 0) {
|
||||
priv->has_ip6 = FALSE;
|
||||
nm_vpn_connection_config_maybe_complete (self, TRUE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue