diff options
author | Thomas Haller <thaller@redhat.com> | 2017-06-13 12:26:51 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-06-13 15:05:30 +0200 |
commit | 4ca3002b86948847711cd5b1937008baef3c30da (patch) | |
tree | ce0af3c50ddbf52e19ffc498f5e0242db9bc4850 /src/devices/nm-device-ip-tunnel.c | |
parent | d2b4332b36686dd5d7382d996743f0ffa1a0fdda (diff) | |
download | NetworkManager-4ca3002b86948847711cd5b1937008baef3c30da.tar.gz |
device: don't set MTU of device unless explicitly configured
Since commit 2b51d3967 "device: merge branch 'th/device-mtu-bgo777251'",
we always set the MTU for certain device types during activation. Even
if the MTU is neither specified via the connection nor other means, like
DHCP.
Revert that change. On activation, if nothing explicitly configures the
MTU, leave it unchanged. This is like what we do with ethernet's
cloned-mac-address, which has a default value "preserve".
So, as last resort the default value for MTU is now 0 (don't change),
instead of depending on the device type.
Note that you also can override the default value in global
configuration via NetworkManager.conf.
This behavior makes sense, because whenever NM actively resets the MTU,
it remembers the previous value and restores it when deactivating
the connection. That wasn't implemented before 2b51d3967, and the
MTU would depend on which connection was previously active. That
is no longer an issue as the MTU gets reset when deactivating.
https://bugzilla.redhat.com/show_bug.cgi?id=1460760
Diffstat (limited to 'src/devices/nm-device-ip-tunnel.c')
-rw-r--r-- | src/devices/nm-device-ip-tunnel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/nm-device-ip-tunnel.c b/src/devices/nm-device-ip-tunnel.c index 53b7cf4e5f..2f505ef4cf 100644 --- a/src/devices/nm-device-ip-tunnel.c +++ b/src/devices/nm-device-ip-tunnel.c @@ -767,7 +767,7 @@ get_configured_mtu (NMDevice *self, gboolean *out_is_user_config) } } *out_is_user_config = (mtu != 0); - return mtu ?: NM_DEVICE_DEFAULT_MTU_WIRED; + return mtu; } static NMDeviceCapabilities |