mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 09:30:21 +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.
(cherry picked from commit bf70ed2e86)
This commit is contained in:
parent
fa68e17abe
commit
8ab9634fdb
1 changed files with 10 additions and 0 deletions
|
|
@ -1369,6 +1369,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");
|
||||
|
||||
|
|
@ -1538,6 +1543,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