mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 07:30:10 +01:00
vpn: don't reset VPN gateway route when parent device is going down
Or really, any time the parent IP4 config is cleared which is pretty much only when the device is going down. Avoids a warning when nm_system_add_ip4_vpn_gateway_route() can't get the parent IP4Config because it doesn't exist.
This commit is contained in:
parent
4c77fa0862
commit
db588ed8e5
1 changed files with 2 additions and 1 deletions
|
|
@ -209,7 +209,8 @@ device_ip4_config_changed (NMDevice *device,
|
|||
NMVPNConnection *vpn = NM_VPN_CONNECTION (user_data);
|
||||
NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (vpn);
|
||||
|
||||
if (priv->vpn_state != NM_VPN_CONNECTION_STATE_ACTIVATED)
|
||||
if ( (priv->vpn_state != NM_VPN_CONNECTION_STATE_ACTIVATED)
|
||||
|| !nm_device_get_ip4_config (device))
|
||||
return;
|
||||
|
||||
if (priv->gw_route)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue