ACK: [SRU][M:meta-laptop][PATCH] UBUNTU: Set persistent wifi MAC address

Dimitri John Ledkov dimitri.ledkov at canonical.com
Wed Nov 22 11:52:10 UTC 2023


On Fri, 27 Oct 2023 at 19:28, Juerg Haefliger
<juerg.haefliger at canonical.com> wrote:
>
> BugLink: https://bugs.launchpad.net/2039144
>
> The X13s comes up with a random wifi MAC address, because it's hidden
> probably in secret storage that the kernel can't get to (yet). This can
> be problematic for some environments and MAC address randomization should
> really be handled by NetworkManager. So set a unique and persistent
> MAC based on /etc/machine-id.
>
> Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
> ---
>  rules.d/60-laptop-persistent-wifi-mac.rules |  2 ++
>  share/set-wifi-mac-addr                     | 16 ++++++++++++++++
>  2 files changed, 18 insertions(+)
>  create mode 100644 rules.d/60-laptop-persistent-wifi-mac.rules
>  create mode 100755 share/set-wifi-mac-addr
>
> diff --git a/rules.d/60-laptop-persistent-wifi-mac.rules b/rules.d/60-laptop-persistent-wifi-mac.rules
> new file mode 100644
> index 000000000000..e667f9d13f3a
> --- /dev/null
> +++ b/rules.d/60-laptop-persistent-wifi-mac.rules
> @@ -0,0 +1,2 @@
> +# Set wifi MAC on X13s
> +SUBSYSTEM=="net", ACTION=="add", ATTRS{vendor}=="0x17cb", ATTRS{device}=="0x1103", PROGRAM="/usr/share/linux-laptop/set-wifi-mac-addr %k"
> diff --git a/share/set-wifi-mac-addr b/share/set-wifi-mac-addr
> new file mode 100755
> index 000000000000..1b56e22e5638
> --- /dev/null
> +++ b/share/set-wifi-mac-addr
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +#
> +# Set X13s wifi MAC address
> +#
> +
> +intf=${1}
> +
> +# Bytes 2-4 from /etc/machine-id
> +nic=$(sed 's/\(..\)/\1:/g' /etc/machine-id | cut -c 4-11)
> +
> +# Qualcomm OUI
> +oui="8c:fd:f0"
> +
> +mac="${oui}:${nic}"
> +echo "Set MAC addr of ${intf} to ${mac}"
> +/bin/ip link set "${intf}" address "${mac}"
> --
> 2.39.2
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Note, for the meta change, we can respin meta alone to get these mac
address fixes out to the users.

Acked-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>

okurrr,

Dimitri



More information about the kernel-team mailing list