NetworkManager r3376 - in trunk/vpn-daemons/vpnc: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3376 - in trunk/vpn-daemons/vpnc: . src
- Date: Thu, 6 Mar 2008 18:24:41 +0000 (GMT)
Author: dcbw
Date: Thu Mar 6 18:24:40 2008
New Revision: 3376
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3376&view=rev
Log:
2008-03-06 Dan Williams <dcbw redhat com>
* src/nm-vpnc-service-vpnc-helper.c
- (main): pass the MTU in the returned option hash table
Modified:
trunk/vpn-daemons/vpnc/ChangeLog
trunk/vpn-daemons/vpnc/src/nm-vpnc-service-vpnc-helper.c
Modified: trunk/vpn-daemons/vpnc/src/nm-vpnc-service-vpnc-helper.c
==============================================================================
--- trunk/vpn-daemons/vpnc/src/nm-vpnc-service-vpnc-helper.c (original)
+++ trunk/vpn-daemons/vpnc/src/nm-vpnc-service-vpnc-helper.c Thu Mar 6 18:24:40 2008
@@ -114,6 +114,21 @@
}
static GValue *
+uint_to_gvalue (guint32 num)
+{
+ GValue *val;
+
+ if (num == 0)
+ return NULL;
+
+ val = g_slice_new0 (GValue);
+ g_value_init (val, G_TYPE_UINT);
+ g_value_set_uint (val, num);
+
+ return val;
+}
+
+static GValue *
addr_to_gvalue (const char *str)
{
struct in_addr temp_addr;
@@ -126,11 +141,7 @@
if (!inet_aton (str, &temp_addr))
return NULL;
- val = g_slice_new0 (GValue);
- g_value_init (val, G_TYPE_UINT);
- g_value_set_uint (val, temp_addr.s_addr);
-
- return val;
+ return uint_to_gvalue (temp_addr.s_addr);
}
static GValue *
@@ -263,6 +274,11 @@
if (val)
g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_BANNER, val);
+ /* Set MTU to 1412 */
+ val = uint_to_gvalue (1412);
+ if (val)
+ g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_MTU, val);
+
/* Send the config info to nm-vpnc-service */
send_ip4_config (connection, config);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]