From 8e541d71cf6cd3db985846d8754b292864887582 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 4 Dec 2006 03:48:12 +0000 Subject: [PATCH] 2006-12-03 Dan Williams Patch from Nathaniel McCallum * properties/nm-ppp-dialog.glade properties/nm-ppp-properties.c src/nm-ppp-starter.c - Add option for Stateful MPPE git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2156 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- vpn-daemons/pptp/ChangeLog | 9 +++++++ .../pptp/properties/nm-ppp-dialog.glade | 25 ++++++++++++++++++- .../pptp/properties/nm-ppp-properties.c | 8 ++++++ vpn-daemons/pptp/src/nm-ppp-starter.c | 6 +++++ 4 files changed, 47 insertions(+), 1 deletion(-) diff --git a/vpn-daemons/pptp/ChangeLog b/vpn-daemons/pptp/ChangeLog index 4295c35705..aebfa11cf1 100644 --- a/vpn-daemons/pptp/ChangeLog +++ b/vpn-daemons/pptp/ChangeLog @@ -1,3 +1,12 @@ +2006-12-03 Dan Williams + + Patch from Nathaniel McCallum + + * properties/nm-ppp-dialog.glade + properties/nm-ppp-properties.c + src/nm-ppp-starter.c + - Add option for Stateful MPPE + 2006-10-30 Tambet Ingo * src/nm-pppd-plugin.c: Remove the leading NetworkManager directory diff --git a/vpn-daemons/pptp/properties/nm-ppp-dialog.glade b/vpn-daemons/pptp/properties/nm-ppp-dialog.glade index 3ce6480ac2..b2262cab89 100644 --- a/vpn-daemons/pptp/properties/nm-ppp-dialog.glade +++ b/vpn-daemons/pptp/properties/nm-ppp-dialog.glade @@ -1317,7 +1317,7 @@ e.g. "Campus VPN" or "Corporate Network" True - 2 + 3 1 False 0 @@ -1366,6 +1366,29 @@ e.g. "Campus VPN" or "Corporate Network" + + + + True + True + Enable stateful MPPE + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + 1 + 2 + 3 + fill + + + + diff --git a/vpn-daemons/pptp/properties/nm-ppp-properties.c b/vpn-daemons/pptp/properties/nm-ppp-properties.c index 61dfa0d88b..87cdc40434 100644 --- a/vpn-daemons/pptp/properties/nm-ppp-properties.c +++ b/vpn-daemons/pptp/properties/nm-ppp-properties.c @@ -73,6 +73,7 @@ #define VPNUI_BTGPRS_DEFAULTS "ppp-connection-type=btgprs;" \ "encrypt-mppe=no;" \ "encrypt-mppe-128=no;" \ + "encrypt-mppe-stateful=no;" \ "compress-mppc=no;" \ "compress-bsd=no;" \ "compress-deflate=no;" \ @@ -82,6 +83,7 @@ "ppp-connection-type=pptp;" \ "encrypt-mppe=no;" \ "encrypt-mppe-128=yes;" \ + "encrypt-mppe-stateful=yes;" \ "compress-mppc=no;" \ "compress-bsd=no;" \ "compress-deflate=no;" \ @@ -93,6 +95,7 @@ "ppp-connection-type=dialup;" \ "encrypt-mppe=no;" \ "encrypt-mppe-128=no;" \ + "encrypt-mppe-stateful=no;" \ "compress-mppc=no;" \ "compress-bsd=no;" \ "compress-deflate=no;" \ @@ -208,6 +211,11 @@ impl_setup (NetworkManagerVpnUIImpl *impl) "encrypt-mppe-128", "Encrypt-MPPE-128", _("Use 128 bit MPPE encryption"), NULL, NULL, impl ); + opt = vpnui_opt_new( + "encrypt-mppe-stateful" , VPN_UI_OPTTYPE_YESNO , + "encrypt-mppe-stateful", "Encrypt-MPPE-Stateful", _("Enable stateful MPPE"), + NULL, NULL, impl ); + opt = vpnui_opt_new( "compress-mppc" , VPN_UI_OPTTYPE_YESNO , "compress-mppc", "Compress-MPPC", _("Use MPPC compression"), diff --git a/vpn-daemons/pptp/src/nm-ppp-starter.c b/vpn-daemons/pptp/src/nm-ppp-starter.c index 3c0a25c21e..5c15a8c7a1 100644 --- a/vpn-daemons/pptp/src/nm-ppp-starter.c +++ b/vpn-daemons/pptp/src/nm-ppp-starter.c @@ -716,6 +716,10 @@ static gint nm_ppp_get_cmdline_ppp (NmPPPData *data, char **data_items, const in (strcmp( data_items[++i], "yes" ) == 0) ) { g_ptr_array_add (ppp_argv, (gpointer) "require-mppe-128"); + } else if ( (strcmp( data_items[i], "encrypt-mppe-stateful" ) == 0) && + (strcmp( data_items[++i], "yes" ) == 0) ) { + g_ptr_array_add (ppp_argv, (gpointer) "mppe-stateful"); + } else if ( (strcmp( data_items[i], "compress-mppc" ) == 0) && (strcmp( data_items[++i], "yes" ) == 0) ) { g_ptr_array_add (ppp_argv, (gpointer) "require-mppc"); @@ -895,6 +899,7 @@ static gboolean nm_ppp_config_options_validate (NmPPPData *data, char **data_ite { "compress-deflate", OPT_TYPE_ASCII }, { "encrypt-mppe", OPT_TYPE_ASCII }, { "encrypt-mppe-128", OPT_TYPE_ASCII }, + { "encrypt-mppe-stateful", OPT_TYPE_ASCII }, { "ppp-auth-peer", OPT_TYPE_ASCII }, { "ppp-refuse-eap", OPT_TYPE_ASCII }, { "ppp-refuse-chap", OPT_TYPE_ASCII }, @@ -921,6 +926,7 @@ static gboolean nm_ppp_config_options_validate (NmPPPData *data, char **data_ite { NULL, OPT_TYPE_UNKNOWN } }; PPPOption allowed_extra_ppp_opts[] = { + { "mppe-stateful", 0 }, { "require-mppe-128", 0 }, { "refuse-eap", 0 }, { "refuse-chap", 0 },