commit a1942e6e8d760e48c666bd830225d70523a45988
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Tue Sep 24 22:09:47 2019 +0200
Workaround RHBZ#1703745 and RFBZ#5245 - Disable NetworkManager scan
with randomized MAC address and added appropriated section in
fedora.readme file
fedora.readme clean-up
Use %{_metainfodir} macro in spec file
90-broadcom-wl.conf | 23 ++++++++++++++
broadcom-wl.spec | 22 ++++++++++---
fedora.readme | 89 ++++++++++++++++++++++++++++++++++++++---------------
3 files changed, 105 insertions(+), 29 deletions(-)
---
diff --git a/90-broadcom-wl.conf b/90-broadcom-wl.conf
new file mode 100644
index 0000000..2c04cf4
--- /dev/null
+++ b/90-broadcom-wl.conf
@@ -0,0 +1,23 @@
+## /usr/lib/NetworkManager/conf.d/90-broadcom-wl.conf file
+##
+## Use only with Broadcom STA wireless driver provided by RPMFusion
+## broadcom-wl, akmod-wl and kmod-wl packages.
+##
+## This file disables randomized MAC address while scanning wireless
+## access point with Broadcom STA wireless driver (wl) as a workaround
+## for RHBZ#1703745 and RFBZ#5245.
+## See also:
+## -
https://bugzilla.gnome.org/show_bug.cgi?id=777523
+## - RHBZ#1695696
+##
+## Use with care as anonymity is potentially disabled while scanning
+## for a wireless access point.
+##
+[device-disable-wifi-scan-rand-mac-address]
+match-device=driver:wl
+wifi.scan-rand-mac-address=no
+
+[connection-disable-wifi-scan-rand-mac-address]
+match-device=driver:wl
+wifi.cloned-mac-address=preserve
+ethernet.cloned-mac-address=preserve
diff --git a/broadcom-wl.spec b/broadcom-wl.spec
index 8f530cc..a845b5c 100644
--- a/broadcom-wl.spec
+++ b/broadcom-wl.spec
@@ -4,6 +4,7 @@
#
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelin...
%global _modprobe_d %{_prefix}/lib/modprobe.d
%global _dracut_conf_d %{_prefix}/lib/dracut/dracut.conf.d
+ %global _nmlibdir_conf_d %{_prefix}/lib/NetworkManager/conf.d
%else #rhel <= 6
%global _modprobe_d %{_sysconfdir}/modprobe.d
%global _dracut_conf_d %{_sysconfdir}/dracut.conf.d
@@ -17,7 +18,7 @@
Name: broadcom-wl
Version: 6.30.223.271
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: Common files for Broadcom 802.11 STA driver
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -31,6 +32,7 @@ Source5: api
Source6: fedora.readme
Source7: com.broadcom.wireless.hybrid.driver.metainfo.xml
Source8: generate-modalias-metadata.py
+Source9: 90-broadcom-wl.conf
BuildArch: noarch
Provides: wl-kmod-common = %{?epoch}:%{version}
@@ -74,10 +76,12 @@ install -p -m 0644 %{SOURCE4} %{buildroot}%{_dracut_conf_d}/
install -m 0755 -d %{buildroot}%{_sysconfdir}/akmods/akmod-wl/
install -p -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/akmods/akmod-wl/
%if 0%{?rhel} > 6 || 0%{?fedora} >= 25
+install -m 0755 -d %{buildroot}%{_nmlibdir_conf_d}/
+install -p -m 0644 %{SOURCE9} %{buildroot}%{_nmlibdir_conf_d}/
# install AppData and add modalias provides
-install -m 0755 -d %{buildroot}%{_datadir}/metainfo/
-install -p -m 0644 %{SOURCE7} %{buildroot}%{_datadir}/metainfo/
-fn=%{buildroot}%{_datadir}/metainfo/com.broadcom.wireless.hybrid.driver.metainfo.xml
+install -m 0755 -d %{buildroot}%{_metainfodir}/
+install -p -m 0644 %{SOURCE7} %{buildroot}%{_metainfodir}/
+fn=%{buildroot}%{_metainfodir}/com.broadcom.wireless.hybrid.driver.metainfo.xml
# As appstream-util deletes all comments in the metainfo.xml file, the
# copyright must be saved and re-written to the resulting file.
copyright_string=$(grep Copyright ${fn})
@@ -101,13 +105,21 @@ grep -q Copyright ${fn} >/dev/null || sed -i
"s%\(^<?xml.*$\)%\1\n${copyright_st
%doc lib/LICENSE.txt
%endif
%if 0%{?rhel} > 6 || 0%{?fedora} >= 25
-%{_datadir}/metainfo/com.broadcom.wireless.hybrid.driver.metainfo.xml
+%{_metainfodir}/com.broadcom.wireless.hybrid.driver.metainfo.xml
+%config %{_nmlibdir_conf_d}/90-broadcom-wl.conf
%endif
%config(noreplace) %{_modprobe_d}/broadcom-wl-blacklist.conf
%config(noreplace) %{_dracut_conf_d}/20-wl.conf
%config(noreplace) %{_sysconfdir}/akmods/akmod-wl/api
%changelog
+* Tue Sep 24 2019 Nicolas Viéville <nicolas.vieville(a)uphf.fr> - 6.30.223.271-12
+- Workaround RHBZ#1703745 and RFBZ#5245 - Disable NetworkManager scan
+ with randomized MAC address and added appropriated section in
+ fedora.readme file
+- fedora.readme clean-up
+- Use %%{_metainfodir} macro in spec file
+
* Sat Aug 10 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
6.30.223.271-11
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
diff --git a/fedora.readme b/fedora.readme
index 9736de0..00a5ff7 100644
--- a/fedora.readme
+++ b/fedora.readme
@@ -1,7 +1,19 @@
-This file provides some basic information about Broadcom STA wireless
+This file provides some basic information about Broadcom STA wireless
driver configuration files on Fedora with RPMFusion packages.
------------------------------------------------------------------------
Version 0.1 - Tue Nov 06 2012 - initial release
+Version 0.2 - Wed Jun 19 2019 - Added NetworkManager configuration to
+ disable random MAC address while
+ scanning for AP
+------------------------------------------------------------------------
+
+------------------------------------------------------------------------
+Table of content
+ 0. Cautions
+ 1. Choosing between WEXT or CFG80211 API
+ 2. Initramfs configuration file usage
+ 3. NetworkManager configuration file usage
+ 4. Support
------------------------------------------------------------------------
@@ -9,31 +21,31 @@ Version 0.1 - Tue Nov 06 2012 - initial release
===========
The files mentioned in this document should not be used in a wireless
-operational system. Only failing wireless system should give a try to
-this file proposed solutions.
-Use them at your own risk and only if your system could not boot
+operational system. Only failing wireless system should give a try to
+these files and the proposed solutions.
+Use them at your own risk and only if your system could not boot
properly or if your Broadcom wireless device doesn't work correctly.
1. Choosing between WEXT or CFG80211 API
========================================
-Some configurations require the user to choose between the WEXT API or
-CFG80211 API in order to get Broadcom STA wireless driver properly
+Some configurations require the user to choose between the WEXT API or
+CFG80211 API in order to get Broadcom STA wireless driver properly
loaded, and correctly usable by third-party softwares.
Since this driver cannot be configured on-the-fly, the only solution is
-to use RPMFusion akmod-wl package only and set the
+to use RPMFusion akmod-wl package only and set the
/etc/akmods/akmod-wl/api file correctly.
-No RPMFusion kmod-wl package installed will take care of the settings
-provided in the /etc/akmods/akmod-wl/api file, and using this file
+No RPMFusion kmod-wl package installed will take care of the settings
+provided in the /etc/akmods/akmod-wl/api file, and using this file
requires an exclusive usage of the akmod-wl package.
-/etc/akmods/akmod-wl/api file should contain only one line depending on
+/etc/akmods/akmod-wl/api file should contain only one line depending on
the API choosen:
API=WEXT
-to force building the module with WEXT API or
+to force building the module with WEXT API or
API=CFG80211
@@ -41,11 +53,11 @@ to force building the module with CFG80211 API or
#API=WEXT
-or
+or
#API=CFG80211
-to let the Broadcom included Makefile do the right choice according to
+to let the Broadcom included Makefile do the right choice according to
your current kernel version.
#API=WEXT is the default setting.
@@ -57,37 +69,37 @@ akmods --force --kernel `uname -r` --akmod wl
Reboot should be needed in order to get last wl module correctly loaded.
-Caution :
+Caution :
---------
WEXT API will be dropped from future kernels according to
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commi...
-This workaround should only used on compatibles kernels with the
+This workaround should only used on compatibles kernels with the
WEXT API.
-One should considere to switch to higher wireless compatible Fedora
-Release in order to get the most recent CFG80211 API with most recent
+One should considere to switch to higher wireless compatible Fedora
+Release in order to get the most recent CFG80211 API with most recent
kernel.
-This workaround will be dropped from the future broadcom-wl, kmod-wl and
+This workaround will be dropped from the future broadcom-wl, kmod-wl and
akmod-wl packages when the WEXT API will be dropped too.
2. Initramfs configuration file usage
=====================================
-Please read comments in /etc/dracut.conf.d/20-wl.conf file in order to
+Please read comments in /etc/dracut.conf.d/20-wl.conf file in order to
configure loading modules needed by the Broadcom STA wireless driver in
kernel's init ramdisks.
-Edit the /etc/dracut.conf.d/20-wl.conf file and comment/uncomment the
+Edit the /etc/dracut.conf.d/20-wl.conf file and comment/uncomment the
one line "add_drivers+=" directive depending on your choice.
For example
# nano /etc/dracut.conf.d/20-wl.conf
-or
+or
# sudo nano /etc/dracut.conf.d/20-wl.conf
@@ -95,12 +107,41 @@ should let you to modify this file, ctrl+o would save the file, and
ctrl+x should quit nano.
Then use dracut command to rebuild your current kernel initramfs file.
-See
http://people.redhat.com/harald/dracut.html#id489921 and
-http://people.redhat.com/harald/dracut.html#dracutconf5 for complete
+See
http://people.redhat.com/harald/dracut.html#id489921 and
+http://people.redhat.com/harald/dracut.html#dracutconf5 for complete
explanations on using dracut.
-3. Support
+3. NetworkManager configuration file usage
+==========================================
+
+To try to fix issue related in RHBZ#1703745 and RFBZ#5245 the
+/usr/lib/NetworkManager/conf.d/90-broadcom-wl.conf file is provided.
+
+This file disables NetworkManager randomization of MAC address only for
+Broadcom wireless device using this driver (wl) while scanning for
+wireless access point.
+It prevent producing "CTRL-EVENT-SCAN-FAILED ret=-22 retry=1" messages
+in logs (journalctl -xe) and the inability to connect to wireless access
+point.
+
+The drawback of this setting is that scanning for wireless access point
+uses only the real MAC address of the device and produces less
+anonymity.
+
+In order to disable this setting, one have to create one empty file
+using the exact same name in /etc/NetworkManager/conf.d directory.
+In a root console, type:
+
+touch /etc/NetworkManager/conf.d/90-broadcom-wl.conf
+
+To re-enable this setting, remove the file previously created.
+In a root console, type:
+
+rm -f /etc/NetworkManager/conf.d/90-broadcom-wl.conf
+
+
+4. Support
==========
Support only about these configuration files will be provided on: