From db588ed8e540e9f3fd252ff68a362c4b7587720e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 10 Sep 2009 17:38:47 -0700 Subject: [PATCH] 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. --- src/vpn-manager/nm-vpn-connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index 3ae30940b1..a89c7101f7 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -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)