Import upstream patches after 1.12.6 including a fix for wifi regression

See https://bugzilla.redhat.com/show_bug.cgi?id=1656157
This commit is contained in:
Beniamino Galvani 2018-12-10 14:58:22 +01:00
parent e7a3996283
commit ee9d7beef7
4 changed files with 144 additions and 4 deletions

View File

@ -0,0 +1,29 @@
From b259adf62da5e13112d4abe845c2a2a9a6273095 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Wed, 14 Nov 2018 16:36:33 +0100
Subject: [PATCH 1/3] device: fix wrong connection default property
Fixes: 96cabbcbb8f484f74fe69305b425b5109608e9d7
(cherry picked from commit 218d7687a06e81cbb85849f070d133814a71190e)
(cherry picked from commit 70cbda40cb8e11266db7b89cf408024f5d336527)
(cherry picked from commit a3546bb28d437679df0d9bfb5f6747297fe284ca)
---
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 f0d747e5c..76c80bd3d 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -14734,7 +14734,7 @@ _get_generate_mac_address_mask_setting (NMDevice *self, NMConnection *connection
}
a = nm_config_data_get_connection_default (NM_CONFIG_GET_DATA,
- is_wifi ? "wifi.generate-mac-address-mask" : "ethernet.generate-mac-mac-address-mask",
+ is_wifi ? "wifi.generate-mac-address-mask" : "ethernet.generate-mac-address-mask",
self);
if (!a)
return NULL;
--
2.17.1

View File

@ -0,0 +1,52 @@
From 4c19b09a356a14a1042d962e3d9e856695479c33 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Wed, 14 Nov 2018 16:35:53 +0100
Subject: [PATCH 2/3] man: add missing connection defaults
(cherry picked from commit a482b27593a757ea534d9a9989d7e409b8b2d4ed)
(cherry picked from commit 9135603c93db12adbd9a1982ab45bc84d2078780)
(cherry picked from commit f0890cc83fb5d0ce9c7d4800ab2818666c70dd16)
---
man/NetworkManager.conf.xml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml
index 17bc42f34..f2addce14 100644
--- a/man/NetworkManager.conf.xml
+++ b/man/NetworkManager.conf.xml
@@ -642,6 +642,12 @@ ipv6.ip6-privacy=0
A default value is only consulted if the corresponding per-connection value
explicitly allows for that.
<variablelist>
+ <varlistentry>
+ <term><varname>802-1x.auth-timeout</varname></term>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>cdma.mtu</varname></term>
+ </varlistentry>
<varlistentry>
<term><varname>connection.auth-retries</varname></term>
<listitem><para>If left unspecified, the default value is 3 tries before failing the connection.
@@ -673,6 +679,9 @@ ipv6.ip6-privacy=0
<varlistentry>
<term><varname>ethernet.wake-on-lan</varname></term>
</varlistentry>
+ <varlistentry>
+ <term><varname>gsm.mtu</varname></term>
+ </varlistentry>
<varlistentry>
<term><varname>infiniband.mtu</varname></term>
<listitem><para>If configured explicitly to 0, the MTU is not reconfigured during device activation unless it is required due to IPv6 constraints. If left unspecified, a DHCP/IPv6 SLAAC provided value is used or the MTU is left unspecified on activation.</para></listitem>
@@ -763,6 +772,9 @@ ipv6.ip6-privacy=0
<listitem><para>If left unspecified, the default value
"<literal>optional</literal>" will be used.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>wifi.wake-on-wlan</varname></term>
+ </varlistentry>
</variablelist>
</para>
</refsect2>
--
2.17.1

View File

@ -0,0 +1,52 @@
From 77c31234bcd84faad81d0e33c1662c834a4f616d Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Thu, 6 Dec 2018 16:56:47 +0100
Subject: [PATCH 3/3] device: always take device down when changing MAC for
wifi devices
If the device is not taken down wpa_supplicant does not detect that
the MAC changed and the authentication can fail due to wrong key
derivation.
Fixes: e206a3473249be4c92c5d71214a33e90db301127
https://bugzilla.redhat.com/show_bug.cgi?id=1656157
(cherry picked from commit 29e8f6d5a17c3dbfd11655338cd0ffc61e1fc91b)
(cherry picked from commit b2686110ef9cfcd87470d65872abf4adb9dab37c)
(cherry picked from commit 0624814af17fb66826fda0e901c3d73a292ff37e)
---
src/devices/nm-device.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 76c80bd3d..3df5b28dc 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -14775,7 +14775,7 @@ _hw_addr_set (NMDevice *self,
NMPlatformError plerr;
guint8 addr_bytes[NM_UTILS_HWADDR_LEN_MAX];
gsize addr_len;
- gboolean was_taken_down;
+ gboolean was_taken_down = FALSE;
gboolean retry_down;
nm_assert (NM_IS_DEVICE (self));
@@ -14799,7 +14799,14 @@ _hw_addr_set (NMDevice *self,
_LOGT (LOGD_DEVICE, "set-hw-addr: setting MAC address to '%s' (%s, %s)...", addr, operation, detail);
- was_taken_down = FALSE;
+ if (nm_device_get_device_type (self) == NM_DEVICE_TYPE_WIFI) {
+ /* Always take the device down for Wi-Fi because
+ * wpa_supplicant needs it to properly detect the MAC
+ * change. */
+ retry_down = FALSE;
+ was_taken_down = TRUE;
+ nm_device_take_down (self, FALSE);
+ }
again:
plerr = nm_platform_link_set_address (nm_device_get_platform (self), nm_device_get_ip_ifindex (self), addr_bytes, addr_len);
--
2.17.1

View File

@ -10,7 +10,7 @@
%global epoch_version 1
%global rpm_version 1.12.6
%global real_version 1.12.6
%global release_version 1
%global release_version 2
%global snapshot %{nil}
%global git_sha %{nil}
@ -109,7 +109,9 @@ Source2: 00-server.conf
Source3: 20-connectivity-fedora.conf
Source4: 20-connectivity-redhat.conf
#Patch1: 0001-some.patch
Patch1: 0001-fix-eth-generate-mac-address-mask-global-default.patch
Patch2: 0002-man-add-missing-connection-defaults.patch
Patch3: 0003-wifi-take-down-device-when-changing-mac.patch
Requires(post): systemd
Requires(post): /usr/sbin/update-alternatives
@ -436,8 +438,9 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
%prep
%setup -q -n NetworkManager-%{real_version}
#%patch1 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%if %{with regen_docs}
@ -854,6 +857,10 @@ fi
%changelog
* Mon Dec 10 2018 Beniamino Galvani <bgalvani@redhat.com> - 1:1.12.6-2
- fix connection failure with some Wi-Fi adapters (rh #1656157)
- import other minor upstream fixes after 1.12.6
* Sat Dec 1 2018 Thomas Haller <thaller@redhat.com> - 1:1.12.6-1
- Update to 1.12.6 release