|
|
b1b5c9 |
From 89af6353940018621493764927a3f10335084628 Mon Sep 17 00:00:00 2001
|
|
|
b1b5c9 |
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
|
b1b5c9 |
Date: Fri, 26 Apr 2019 10:49:21 +0200
|
|
|
b1b5c9 |
Subject: [PATCH] device: fix reapply of MTU
|
|
|
b1b5c9 |
|
|
|
b1b5c9 |
When we set the MTU on the link we remember its previous source
|
|
|
b1b5c9 |
(ip-config, parent-device or connection profile) and don't change it
|
|
|
b1b5c9 |
again afterwards to avoid interfering with user's manual changes. The
|
|
|
b1b5c9 |
only exceptions when we change it again are (1) if the parent device
|
|
|
b1b5c9 |
MTU changes and (2) if the new MTU has higher priority than the one
|
|
|
b1b5c9 |
previously set.
|
|
|
b1b5c9 |
|
|
|
b1b5c9 |
To allow a live reapply of the MTU property we also need to clear the
|
|
|
b1b5c9 |
saved source, or the checks described above will prevent setting the
|
|
|
b1b5c9 |
new value.
|
|
|
b1b5c9 |
|
|
|
b1b5c9 |
Fixes: 2f8917237fdf ('device: rework mtu priority handling')
|
|
|
b1b5c9 |
|
|
|
b1b5c9 |
https://bugzilla.redhat.com/show_bug.cgi?id=1702657
|
|
|
b1b5c9 |
(cherry picked from commit 4ed72fa658c03790700ba9084e9328fe38afdee9)
|
|
|
b1b5c9 |
(cherry picked from commit e738479bdd714f754aa311bada3315147efab376)
|
|
|
b1b5c9 |
---
|
|
|
b1b5c9 |
src/devices/nm-device.c | 3 +++
|
|
|
b1b5c9 |
1 file changed, 3 insertions(+)
|
|
|
b1b5c9 |
|
|
|
b1b5c9 |
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
|
|
|
b1b5c9 |
index b909f0ddf..8ae64b968 100644
|
|
|
b1b5c9 |
--- a/src/devices/nm-device.c
|
|
|
b1b5c9 |
+++ b/src/devices/nm-device.c
|
|
|
b1b5c9 |
@@ -11312,6 +11312,9 @@ check_and_reapply_connection (NMDevice *self,
|
|
|
b1b5c9 |
s_ip6_old = nm_connection_get_setting_ip6_config (con_old);
|
|
|
b1b5c9 |
s_ip6_new = nm_connection_get_setting_ip6_config (con_new);
|
|
|
b1b5c9 |
|
|
|
b1b5c9 |
+ /* Allow reapply of MTU */
|
|
|
b1b5c9 |
+ priv->mtu_source = NM_DEVICE_MTU_SOURCE_NONE;
|
|
|
b1b5c9 |
+
|
|
|
b1b5c9 |
nm_device_reactivate_ip4_config (self, s_ip4_old, s_ip4_new);
|
|
|
b1b5c9 |
nm_device_reactivate_ip6_config (self, s_ip6_old, s_ip6_new);
|
|
|
b1b5c9 |
|
|
|
b1b5c9 |
--
|
|
|
b1b5c9 |
2.20.1
|
|
|
b1b5c9 |
|