From: Stefan Schantl Date: Mon, 20 Feb 2023 11:42:35 +0000 (+0100) Subject: QMI: Disable raw_ip mode before assigning the new MAC. X-Git-Tag: v2.27-core173~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=caef75c52974b8fed718ad8b8992442378495e78;p=ipfire-2.x.git QMI: Disable raw_ip mode before assigning the new MAC. To assign a MAC address, the device must not be in the raw_ip mode. Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/networking/functions.network b/src/initscripts/networking/functions.network index 36541eb137..0e2e5009e8 100644 --- a/src/initscripts/networking/functions.network +++ b/src/initscripts/networking/functions.network @@ -273,6 +273,10 @@ qmi_assign_address() { # Find the device local device="$(qmi_find_device "${intf}")" + # Switch off the raw_ip mode to be able to proper + # assign the generated MAC address. + echo "N" > "/sys/class/net/${intf}/qmi/raw_ip" + local address # Generate a "random" MAC address using the device number