diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2018-12-10 17:19:23 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2018-12-10 17:19:23 +0100 |
| commit | 2a1859e7dff13b8e43b15e03aaddaea72445b5b9 (patch) | |
| tree | 433503706f9523dd04fb71f5f3583263bc0b4bba /debian/patches/git-mac-change.patch | |
| parent | e2350feb0e9c7704d46bda478fc31e497de16ab6 (diff) | |
* debian/patches/git_mac_change.patch:
- backported a regression fix from upstream git
Diffstat (limited to 'debian/patches/git-mac-change.patch')
| -rw-r--r-- | debian/patches/git-mac-change.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/debian/patches/git-mac-change.patch b/debian/patches/git-mac-change.patch new file mode 100644 index 00000000..efa01d6d --- /dev/null +++ b/debian/patches/git-mac-change.patch @@ -0,0 +1,50 @@ +From 0624814af17fb66826fda0e901c3d73a292ff37e Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani <bgalvani@redhat.com> +Date: Thu, 6 Dec 2018 16:56:47 +0100 +Subject: 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) +--- + 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 76c80bd..3df5b28 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); +-- +cgit v1.1 + |