mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 08:20:08 +01:00
vpn-connection: set the MTU for the VPN IP interface
The9b79e6c73commit 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:9b79e6c732https://bugzilla.gnome.org/show_bug.cgi?id=754781
This commit is contained in:
parent
8b0bb7a022
commit
e0fa48f224
1 changed files with 3 additions and 7 deletions
|
|
@ -1069,6 +1069,9 @@ nm_vpn_connection_apply_config (NMVpnConnection *self)
|
|||
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 (self);
|
||||
|
|
@ -1258,10 +1261,6 @@ process_generic_config (NMVpnConnection *self, GVariant *dict)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
if (g_variant_lookup (dict, NM_VPN_PLUGIN_CONFIG_EXT_GATEWAY, "u", &u32))
|
||||
priv->mtu = u32;
|
||||
|
|
@ -1404,9 +1403,6 @@ nm_vpn_connection_ip4_config_get (NMVpnConnection *self, GVariant *dict)
|
|||
if (g_variant_lookup (dict, NM_VPN_PLUGIN_IP4_CONFIG_MSS, "u", &u32))
|
||||
nm_ip4_config_set_mss (config, u32);
|
||||
|
||||
if (priv->mtu)
|
||||
nm_ip4_config_set_mtu (config, priv->mtu, NM_IP_CONFIG_SOURCE_VPN);
|
||||
|
||||
if (g_variant_lookup (dict, NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN, "&s", &str))
|
||||
nm_ip4_config_add_domain (config, str);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue