Fix the VPN MTU setup (rh #1244547)
This commit is contained in:
parent
0211fc9bcf
commit
67c159a277
@ -0,0 +1,55 @@
|
||||
From e5508e6d74a9ab9c0559dd854ec6c7b015e7a603 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 28 Sep 2015 20:57:09 +0200
|
||||
Subject: [PATCH] vpn-connection: set the MTU for the VPN IP interface
|
||||
|
||||
The 9b79e6c73 commit moved setting of the MTU from IP4Config to NMDevice, but
|
||||
VPN connections don't have a NMDevice instance (yet). Set the MTU also from the
|
||||
VPN connection. Also, copying of the MTU to the IP4Config is no longer needed
|
||||
as the ip4_config_commit no longer sets the MTU.
|
||||
|
||||
Fixes: 9b79e6c732ffb2fb105647c1465070d36a6cc180
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=754781
|
||||
---
|
||||
src/vpn-manager/nm-vpn-connection.c | 10 +++-------
|
||||
1 file changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
|
||||
index f0e6149..e2d3103 100644
|
||||
--- a/src/vpn-manager/nm-vpn-connection.c
|
||||
+++ b/src/vpn-manager/nm-vpn-connection.c
|
||||
@@ -980,6 +980,9 @@ nm_vpn_connection_apply_config (NMVpnConnection *connection)
|
||||
TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
+
|
||||
+ if (priv->mtu && priv->mtu != nm_platform_link_get_mtu (NM_PLATFORM_GET, priv->ip_ifindex))
|
||||
+ nm_platform_link_set_mtu (NM_PLATFORM_GET, priv->ip_ifindex, priv->mtu);
|
||||
}
|
||||
|
||||
apply_parent_device_config (connection);
|
||||
@@ -1149,10 +1152,6 @@ process_generic_config (NMVpnConnection *connection,
|
||||
}
|
||||
}
|
||||
|
||||
- /* MTU; this is a per-connection value, though NM's API treats it
|
||||
- * like it's IP4-specific. So we store it for now and retrieve it
|
||||
- * later in ip4_config_get.
|
||||
- */
|
||||
priv->mtu = 0;
|
||||
val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_CONFIG_MTU);
|
||||
if (val) {
|
||||
@@ -1328,9 +1327,6 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy,
|
||||
if (val)
|
||||
nm_ip4_config_set_mss (config, g_value_get_uint (val));
|
||||
|
||||
- if (priv->mtu)
|
||||
- nm_ip4_config_set_mtu (config, priv->mtu, NM_IP_CONFIG_SOURCE_VPN);
|
||||
-
|
||||
val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN);
|
||||
if (val)
|
||||
nm_ip4_config_add_domain (config, g_value_get_string (val));
|
||||
--
|
||||
2.5.0
|
||||
|
@ -8,7 +8,7 @@
|
||||
%define ppp_version %(rpm -q ppp-devel >/dev/null && rpm -q --qf '%%{version}' ppp-devel || echo -n bad)
|
||||
|
||||
%define snapshot %{nil}
|
||||
%define release_version 5
|
||||
%define release_version 6
|
||||
%define realversion 1.0.6
|
||||
%define epoch_version 1
|
||||
|
||||
@ -92,6 +92,7 @@ Patch2: 0003-vpn-connection-fix-unsetting-the-gateway.patch
|
||||
Patch3: 0004-device-don-t-reset-NM_UNMANAGED_DEFAULT-when-platfor.patch
|
||||
Patch4: 0001-test-fix-duplicate-test-names.patch
|
||||
Patch5: rh1263185-nmcli-con-add-generic.patch
|
||||
Patch6: 0001-vpn-connection-set-the-MTU-for-the-VPN-IP-interface.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -374,6 +375,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
%build
|
||||
|
||||
@ -692,14 +694,17 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Sep 28 2015 Lubomir Rintel <lkundrak@v3.sk> - 1:1.0.6-6
|
||||
- Fix the VPN MTU setup (rh #1244547)
|
||||
|
||||
* Tue Sep 15 2015 Jiří Klimeš <jklimes@redhat.com> - 1:1.0.6-5
|
||||
- nmcli: allow adding 'generic' connections via 'nmcli con add' (rh #1263185)
|
||||
|
||||
* Tue Sep 8 2015 Lubomir Rintel <lrintel@redhat.com> - 1:1.0.6-4
|
||||
* Tue Sep 8 2015 Lubomir Rintel <lkundrak@v3.sk> - 1:1.0.6-4
|
||||
- Fix build & test with newer glib
|
||||
- Actually apply patch forgotten in a previous release
|
||||
|
||||
* Tue Sep 8 2015 Lubomir Rintel <lrintel@redhat.com> - 1:1.0.6-3
|
||||
* Tue Sep 8 2015 Lubomir Rintel <lkundrak@v3.sk> - 1:1.0.6-3
|
||||
- Fix the tunelled VPN route setup
|
||||
|
||||
* Fri Aug 28 2015 Lubomir Rintel <lkundrak@v3.sk> - 1:1.0.6-2
|
||||
|
Loading…
Reference in New Issue
Block a user