mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 16:20:05 +01:00
vpn: clear the l3cd when the plugin reports that IP is disabled
Until now, the VPN connection started with no IP configuration, gained it at some point later, and never removed it again. With the next commit, NM will support VPN connections in listening mode. When the remote host connects the IP configuration is added. When it disconnects, it is removed. If the IP configuration is removed, we need to clear the corresponding l3cd.
This commit is contained in:
parent
bfbb8235bd
commit
09e74f30d3
1 changed files with 8 additions and 0 deletions
|
|
@ -1919,6 +1919,13 @@ _dbus_signal_config_cb(NMVpnConnection *self, GVariant *dict)
|
|||
priv->ip_data_6.enabled ? "on" : "off",
|
||||
priv->ip_data_6.method_auto ? "auto" : "disabled");
|
||||
|
||||
if (!priv->ip_data_4.enabled) {
|
||||
_l3cfg_l3cd_set(self, L3CD_TYPE_IP_4, NULL);
|
||||
}
|
||||
if (!priv->ip_data_6.enabled) {
|
||||
_l3cfg_l3cd_set(self, L3CD_TYPE_IP_6, NULL);
|
||||
}
|
||||
|
||||
if (!priv->ip_data_4.method_auto)
|
||||
priv->ip_data_4.enabled = FALSE;
|
||||
if (!priv->ip_data_6.method_auto)
|
||||
|
|
@ -2005,6 +2012,7 @@ _dbus_signal_ip_config_cb(NMVpnConnection *self, int addr_family, GVariant *dict
|
|||
}
|
||||
|
||||
if (!priv->ip_data_x[IS_IPv4].enabled) {
|
||||
_l3cfg_l3cd_set(self, L3CD_TYPE_IP_X(IS_IPv4), NULL);
|
||||
_check_complete(self, TRUE);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue