Network interfaces may be silently disabled if MAC spoofing fails
Hi,
In 4.7 (and maybe a couple of versions earlier), some Network Interfaces may be silently disabled if mac-spoofing fails, leading the user with no usable WiFi, but also no notification about the fact disabling mac-spoofing can help.
I have access to one problematic adapter. I can reproduce the issue. However, I was unable to find why mac spoofing silently fails. The adapter in question is an external one. Its module is in staging. I can send a bug with whisperback if relevant but logs do not seems very useful:
Jun 22 19:12:21 amnesia spoof-mac[9741]: Trying to spoof MAC address of NIC wlan1...
Jun 22 19:12:21 amnesia spoof-mac[9749]: macchanger failed for NIC wlan1, returned 1 and said: Current MAC: xx:xx:xx:xx:xx:xx (unknown)
Permanent MAC: xx:xx:xx:xx:xx:xx (unknown)
New MAC: xx:xx:xx:yy:yy:yy (unknown)
Network driver didn't actually change to the new MAC!!
Jun 22 19:12:21 amnesia spoof-mac[9750]: Failed to spoof MAC address of NIC wlan1. Going into panic mode.
Jun 22 19:12:21 amnesia kernel: usbcore: deregistering interface driver r8188eu
Jun 22 19:12:21 amnesia kernel: usb 2-1.2: reset high-speed USB device number 3 using ehci-pci
Jun 22 19:12:21 amnesia kernel: lib80211_crypt: unregistered algorithm 'NULL'
Jun 22 19:12:21 amnesia spoof-mac[9765]: Successfully unloaded module r8188eu of NIC wlan1.
Jun 22 19:12:21 amnesia systemd-udevd[5964]: Process '/usr/local/lib/tails-spoof-mac wlan1' failed with exit code 1.
Jun 22 19:12:21 amnesia ModemManager[3503]: <info> (net/wlan1): released by device '/sys/devices/pci0000:00/0000:00:1d.
I am trying to debug it but no sure I can make it for 4.8. In my attempts to launch the script manually, the message is correctly displayed... It doesn't seems to be a problem with panic (as the module is correctly unloaded).