From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] QMI: Disable raw_ip mode before assigning the new MAC. Date: Mon, 20 Feb 2023 12:42:35 +0100 Message-ID: <20230220114235.2228-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6605809015772507803==" List-Id: --===============6605809015772507803== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To assign a MAC address, the device must not be in the raw_ip mode. Signed-off-by: Stefan Schantl --- src/initscripts/networking/functions.network | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/initscripts/networking/functions.network b/src/initscripts/n= etworking/functions.network index 36541eb13..0e2e5009e 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=3D"$(qmi_find_device "${intf}")" =20 + # 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 =20 # Generate a "random" MAC address using the device number --=20 2.30.2 --===============6605809015772507803==--