diff --git a/SOURCES/0032-don-t-set-a-fake-permanent-hardware-address.patch b/SOURCES/0032-don-t-set-a-fake-permanent-hardware-address.patch new file mode 100644 index 0000000..3cd2ea2 --- /dev/null +++ b/SOURCES/0032-don-t-set-a-fake-permanent-hardware-address.patch @@ -0,0 +1,61 @@ +From 081b84e78487ad96d19fbee71f0af071e1acdf33 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Tue, 25 Jul 2017 10:37:14 +0200 +Subject: [PATCH] device: don't set a fake permanent hardware address + +Software devices don't have a permanent hardware address and thus it +doesn't make sense to enforce the 'fake' (generated) permanent one +when cloned-mac-address=permanent. Also, setting the fake permanent +address on bond devices, prevents them from inheriting the first slave +hardware address, so let's just skip the setting of MAC when +cloned-mac-address=permanent and there is no real permanent address. + +https://bugzilla.redhat.com/show_bug.cgi?id=1472965 +(cherry picked from commit 2f4dfd0f2e8f85dd86f5abfbeaafd7cb04655525) +(cherry picked from commit c8d0a0fcf7b8368b9fbe19f4fb2327349dcc5eba) +--- + libnm-core/nm-setting-wired.c | 3 ++- + src/devices/nm-device.c | 13 +++++++++++-- + 2 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c +index 9bf8255..3ac9cc4 100644 +--- a/libnm-core/nm-setting-wired.c ++++ b/libnm-core/nm-setting-wired.c +@@ -1150,7 +1150,8 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) + * Beside explicitly specifing a MAC address, the special values "preserve", "permanent", + * "random" and "stable" are supported. + * "preserve" means not to touch the MAC address on activation. +- * "permanent" means to use the permanent hardware address of the device. ++ * "permanent" means to use the permanent hardware address if the device ++ * has one (otherwise this is treated as "preserve"). + * "random" creates a random MAC address on each connect. + * "stable" creates a hashed MAC address based on connection.stable-id and a + * machine dependent key. +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index e37b24b..c055747 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -13465,8 +13465,17 @@ _hw_addr_get_cloned (NMDevice *self, NMConnection *connection, gboolean is_wifi, + } + + if (nm_streq (addr, NM_CLONED_MAC_PERMANENT)) { +- addr = nm_device_get_permanent_hw_address (self); +- if (!addr) { ++ gboolean is_fake; ++ ++ addr = nm_device_get_permanent_hw_address_full (self, TRUE, &is_fake); ++ if (is_fake) { ++ /* Preserve the current address if the permanent address if fake */ ++ NM_SET_OUT (preserve, TRUE); ++ NM_SET_OUT (hwaddr, NULL); ++ NM_SET_OUT (hwaddr_type, HW_ADDR_TYPE_UNSET); ++ NM_SET_OUT (hwaddr_detail, g_steal_pointer (&addr_setting_free) ?: g_strdup (addr_setting)); ++ return TRUE; ++ } else if (!addr) { + g_set_error_literal (error, + NM_DEVICE_ERROR, + NM_DEVICE_ERROR_FAILED, +-- +2.9.4 + diff --git a/SOURCES/0033-device-fix-delay-startup-complete-for-unrealized-dev.patch b/SOURCES/0033-device-fix-delay-startup-complete-for-unrealized-dev.patch new file mode 100644 index 0000000..bcf6fb8 --- /dev/null +++ b/SOURCES/0033-device-fix-delay-startup-complete-for-unrealized-dev.patch @@ -0,0 +1,37 @@ +From 9c1124ff867654d5cf9e32379c2b9dd5e4c66387 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 29 Sep 2017 17:08:55 +0200 +Subject: [PATCH 1/1] device: fix delay startup complete for unrealized devices + +Since commit 6845b9b80a9fcec9d2c9e7b56a37329f38089f2e ("device: delay +startup complete until device is initialized in platform", we also wait +for devices that are still initializing platform/UDEV. + +Obviously, that only applies to realized devices. + +Otherwise, an unrealized device is going to block startup complete. + +Fixes: 6845b9b80a9fcec9d2c9e7b56a37329f38089f2e +(cherry picked from commit 9ad8010fe0c42291580e4a801ed85947ae660d38) +(cherry picked from commit 0ba498b17dc582dcbd9b7102e03496f391d67812) +--- + src/devices/nm-device.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index c055747fd..088dd0004 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -12018,7 +12018,8 @@ nm_device_has_pending_action (NMDevice *self) + if (priv->pending_actions) + return TRUE; + +- if (nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) { ++ if ( nm_device_is_real (self) ++ && nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) { + /* as long as the platform link is not yet initialized, we have a pending + * action. */ + return TRUE; +-- +2.13.6 + diff --git a/SOURCES/0034-device-fix-frozen-notify-signals-on-unrealize-error-.patch b/SOURCES/0034-device-fix-frozen-notify-signals-on-unrealize-error-.patch new file mode 100644 index 0000000..29938f3 --- /dev/null +++ b/SOURCES/0034-device-fix-frozen-notify-signals-on-unrealize-error-.patch @@ -0,0 +1,41 @@ +From f43390128877d539d8abd49e7539a547567aff98 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 4 Oct 2017 14:30:57 +0200 +Subject: [PATCH 34/34] device: fix frozen notify signals on unrealize error + path + +If unrealize() failed we returned without thawing notify signals. Fix +this by moving g_object_freeze_notify() after the +unrealization/deletion but before the properties are reset in +unrealize_notify(). + +Fixes: a93807c288743f499362f7edfe0674020762811c +(cherry picked from commit 24a7f88bc56b66745c1e6b9444df8a80125de059) +(cherry picked from commit 5bd8269315fc7d41c62e258689a05bf062c6f592) +--- + src/devices/nm-device.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 088dd0004..04e48e5b8 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -3257,7 +3257,6 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error) + g_return_val_if_fail (priv->iface != NULL, FALSE); + g_return_val_if_fail (priv->real, FALSE); + +- g_object_freeze_notify (G_OBJECT (self)); + + ifindex = nm_device_get_ifindex (self); + +@@ -3274,6 +3273,7 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error) + } + } + ++ g_object_freeze_notify (G_OBJECT (self)); + NM_DEVICE_GET_CLASS (self)->unrealize_notify (self); + + _parent_set_ifindex (self, 0, FALSE); +-- +2.13.6 + diff --git a/SPECS/NetworkManager.spec b/SPECS/NetworkManager.spec index b429722..d246d10 100644 --- a/SPECS/NetworkManager.spec +++ b/SPECS/NetworkManager.spec @@ -9,7 +9,7 @@ %global epoch_version 1 %global rpm_version 1.8.0 %global real_version 1.8.0 -%global release_version 9 +%global release_version 11 %global snapshot %{nil} %global git_sha %{nil} @@ -112,6 +112,9 @@ Patch28: 0028-ppp-unexport-ppp-manager-on-dispose.patch Patch29: 0029-cli-wifi-spurious-output.patch Patch30: 0030-device-mtu-preserve-rh1460760.patch Patch31: 0031-don-t-remove-ext-ipv4-addresses-rh1459813.patch +Patch32: 0032-don-t-set-a-fake-permanent-hardware-address.patch +Patch33: 0033-device-fix-delay-startup-complete-for-unrealized-dev.patch +Patch34: 0034-device-fix-frozen-notify-signals-on-unrealize-error-.patch # The pregenerated docs contain default values and paths that depend # on the configure options when creating the source tarball. @@ -410,6 +413,9 @@ by nm-connection-editor and nm-applet in a non-graphical environment. %patch29 -p1 %patch30 -p1 %patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 %patch9999 -p1 %build @@ -713,6 +719,13 @@ fi %endif %changelog +* Fri Oct 6 2017 Thomas Haller - 1:1.8.0-11 +- core: fix wrongly delaying startup-complete for unrealized devices (rh#1498807) +- core: fix unfreezing signals when unrealizing device fails (rh#1498755) + +* Tue Sep 12 2017 Beniamino Galvani - 1:1.8.0-10 +- core: fix for MAC change after master reactivation (rh #1490741) + * Tue Jun 13 2017 Thomas Haller - 1:1.8.0-9 - device: don't change MTU unless explicitly configured (rh #1460760) - core: don't remove external IPv4 addresses (rh #1459813)