]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
QMI: Disable raw_ip mode before assigning the new MAC.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 20 Feb 2023 11:42:35 +0000 (12:42 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 20 Feb 2023 12:29:21 +0000 (12:29 +0000)
To assign a MAC address, the device must not be in
the raw_ip mode.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/networking/functions.network

index 36541eb13792d0ab55ab52a9acfa7f12e62ea34f..0e2e5009e8dc88357b9044f38a6ba3b96f7d018b 100644 (file)
@@ -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