public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] QMI: Disable raw_ip mode before assigning the new MAC.
@ 2023-02-20 11:42 Stefan Schantl
  0 siblings, 0 replies; only message in thread
From: Stefan Schantl @ 2023-02-20 11:42 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

To assign a MAC address, the device must not be in
the raw_ip mode.

Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
---
 src/initscripts/networking/functions.network | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/initscripts/networking/functions.network b/src/initscripts/networking/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="$(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
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-20 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 11:42 [PATCH] QMI: Disable raw_ip mode before assigning the new MAC Stefan Schantl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox