diff --git a/vpn-daemons/vpnc/ChangeLog b/vpn-daemons/vpnc/ChangeLog index 70ef6c349d..1a2ac5849d 100644 --- a/vpn-daemons/vpnc/ChangeLog +++ b/vpn-daemons/vpnc/ChangeLog @@ -1,3 +1,9 @@ +2008-10-09 Dan Williams + + * properties/nm-vpnc.c + - (update_connection): only set DPD timeout if it was something other + than the default value + 2008-09-09 Dan Williams * common-gnome/keyring-helpers.c diff --git a/vpn-daemons/vpnc/properties/nm-vpnc.c b/vpn-daemons/vpnc/properties/nm-vpnc.c index 79df93f184..ca8dc7cb03 100644 --- a/vpn-daemons/vpnc/properties/nm-vpnc.c +++ b/vpn-daemons/vpnc/properties/nm-vpnc.c @@ -485,9 +485,15 @@ update_connection (NMVpnPluginUiWidgetInterface *iface, g_strdup (NM_VPNC_KEY_DPD_IDLE_TIMEOUT), g_strdup ("0")); } else { - g_hash_table_insert (s_vpn->data, - g_strdup (NM_VPNC_KEY_DPD_IDLE_TIMEOUT), - g_strdup_printf ("%d", priv->orig_dpd_timeout)); + /* If DPD was disabled and now the user wishes to enable it, just + * don't pass the DPD_IDLE_TIMEOUT option to vpnc and thus use the + * default DPD idle time. Otherwise keep the original DPD idle timeout. + */ + if (priv->orig_dpd_timeout >= 10) { + g_hash_table_insert (s_vpn->data, + g_strdup (NM_VPNC_KEY_DPD_IDLE_TIMEOUT), + g_strdup_printf ("%d", priv->orig_dpd_timeout)); + } } /* System secrets get stored in the connection, user secrets are saved