|
|
ab7d06 |
From 105e30efbaf422401902575749efdcd18706ace1 Mon Sep 17 00:00:00 2001
|
|
|
ab7d06 |
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
|
ab7d06 |
Date: Mon, 28 Sep 2015 20:57:09 +0200
|
|
|
ab7d06 |
Subject: [PATCH] vpn-connection: set the MTU for the VPN IP interface
|
|
|
ab7d06 |
|
|
|
ab7d06 |
The 9b79e6c73 commit moved setting of the MTU from IP4Config to NMDevice, but
|
|
|
ab7d06 |
VPN connections don't have a NMDevice instance (yet). Set the MTU also from the
|
|
|
ab7d06 |
VPN connection. Also, copying of the MTU to the IP4Config is no longer needed
|
|
|
ab7d06 |
as the ip4_config_commit no longer sets the MTU.
|
|
|
ab7d06 |
|
|
|
ab7d06 |
Fixes: 9b79e6c732ffb2fb105647c1465070d36a6cc180
|
|
|
ab7d06 |
|
|
|
ab7d06 |
https://bugzilla.gnome.org/show_bug.cgi?id=754781
|
|
|
ab7d06 |
(cherry picked from commit e0fa48f224abcb73a1a129f10050f7cd942ee629)
|
|
|
ab7d06 |
---
|
|
|
ab7d06 |
src/vpn-manager/nm-vpn-connection.c | 10 +++-------
|
|
|
ab7d06 |
1 file changed, 3 insertions(+), 7 deletions(-)
|
|
|
ab7d06 |
|
|
|
ab7d06 |
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
|
|
|
ab7d06 |
index f0e6149..e2d3103 100644
|
|
|
ab7d06 |
--- a/src/vpn-manager/nm-vpn-connection.c
|
|
|
ab7d06 |
+++ b/src/vpn-manager/nm-vpn-connection.c
|
|
|
ab7d06 |
@@ -980,6 +980,9 @@ nm_vpn_connection_apply_config (NMVpnConnection *connection)
|
|
|
ab7d06 |
TRUE))
|
|
|
ab7d06 |
return FALSE;
|
|
|
ab7d06 |
}
|
|
|
ab7d06 |
+
|
|
|
ab7d06 |
+ if (priv->mtu && priv->mtu != nm_platform_link_get_mtu (NM_PLATFORM_GET, priv->ip_ifindex))
|
|
|
ab7d06 |
+ nm_platform_link_set_mtu (NM_PLATFORM_GET, priv->ip_ifindex, priv->mtu);
|
|
|
ab7d06 |
}
|
|
|
ab7d06 |
|
|
|
ab7d06 |
apply_parent_device_config (connection);
|
|
|
ab7d06 |
@@ -1149,10 +1152,6 @@ process_generic_config (NMVpnConnection *connection,
|
|
|
ab7d06 |
}
|
|
|
ab7d06 |
}
|
|
|
ab7d06 |
|
|
|
ab7d06 |
- /* MTU; this is a per-connection value, though NM's API treats it
|
|
|
ab7d06 |
- * like it's IP4-specific. So we store it for now and retrieve it
|
|
|
ab7d06 |
- * later in ip4_config_get.
|
|
|
ab7d06 |
- */
|
|
|
ab7d06 |
priv->mtu = 0;
|
|
|
ab7d06 |
val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_CONFIG_MTU);
|
|
|
ab7d06 |
if (val) {
|
|
|
ab7d06 |
@@ -1328,9 +1327,6 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy,
|
|
|
ab7d06 |
if (val)
|
|
|
ab7d06 |
nm_ip4_config_set_mss (config, g_value_get_uint (val));
|
|
|
ab7d06 |
|
|
|
ab7d06 |
- if (priv->mtu)
|
|
|
ab7d06 |
- nm_ip4_config_set_mtu (config, priv->mtu, NM_IP_CONFIG_SOURCE_VPN);
|
|
|
ab7d06 |
-
|
|
|
ab7d06 |
val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN);
|
|
|
ab7d06 |
if (val)
|
|
|
ab7d06 |
nm_ip4_config_add_domain (config, g_value_get_string (val));
|
|
|
ab7d06 |
--
|
|
|
ab7d06 |
2.4.3
|
|
|
ab7d06 |
|