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:
Dan Williams 2009-09-10 17:38:47 -07:00
parent 4c77fa0862
commit db588ed8e5

View file

@ -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)