mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 23:00:07 +01:00
ppp: honor MTU from PPP setting
This commit is contained in:
parent
8a1e437eca
commit
4a7bfefeec
1 changed files with 10 additions and 0 deletions
|
|
@ -466,6 +466,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager,
|
|||
{
|
||||
NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (manager);
|
||||
NMConnection *connection;
|
||||
NMSettingPPP *s_ppp;
|
||||
NMIP4Config *config;
|
||||
NMIP4Address *addr;
|
||||
GValue *val;
|
||||
|
|
@ -529,6 +530,15 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager,
|
|||
g_assert (connection);
|
||||
g_object_set_data (G_OBJECT (connection), PPP_MANAGER_SECRET_TRIES, NULL);
|
||||
|
||||
/* Merge in custom MTU */
|
||||
s_ppp = (NMSettingPPP *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PPP);
|
||||
if (s_ppp) {
|
||||
guint32 mtu = nm_setting_ppp_get_mtu (s_ppp);
|
||||
|
||||
if (mtu)
|
||||
nm_ip4_config_set_mtu (config, mtu);
|
||||
}
|
||||
|
||||
/* Push the IP4 config up to the device */
|
||||
g_signal_emit (manager, signals[IP4_CONFIG], 0, priv->ip_iface, config);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue