maemo-leste / bugtracker

Issue tracking repository
62 stars 3 forks source link

after changing mac with macchanger, d4 doesn't connect to wifi anymore #707

Open norayr opened 1 year ago

norayr commented 1 year ago

even if restarting icd2. to reproduce:

IMbackK commented 1 year ago

pretty mutch expected, icd only uses wlan0, udev decides what device is wlan0 by saveing the mac address, if you change it, after reboot wlan0 becomes wlan1 and its over

norayr commented 1 year ago

well i think it worked some time ago because maemo wiki explains how to use macchanger: https://leste.maemo.org/Tricks

MerlijnWajer commented 1 year ago

Yeah, so this probably comes down to libicd-network-wpasupplicant wanting to work on wlan0 only currently. We can change this, but it raises a few other questions and things I'd have to investigate, like if the code can currently re-use the same wpa_supplicant instance, or if we'd have multiple, and if we really want the network interface names to linearly increase every time you change the MAC.

We could just point the udev rules file to /dev/null and at least this specific problem would be gone. (I do think we want to support other names than wlan0, fwiw)

norayr commented 1 year ago

i think since ios and android (12 for sure) randomize mac address every time before connection, and maemo aims to be secure os, it is worth to make mac address randomization a default behaviour for our operating system.

norayr commented 1 year ago

wait, i don't understand why are you saying about wlan1, wlan2 etc.

i just again changed mac address of wlan0:

macchanger -a wlan0

it wrote on console current, permanent and new macs.

ifconfig -a

does not reveal any wlan1 or wlan2, just mac address of the same old wlan0 got changed.

IMbackK commented 1 year ago

if it dosent work after changeing the mac, but before rebooting, thats a bit wierd, try restarting icd2 and wpa_supplicant. but atm changeing mac is not supported due to the known problem with presitant names and icd.

i dont thing randomized mac is a sane default, i like being able to define a persistant ip for my leste devices via mac and dhcpd, anyhow we should eventually fix the icd limitation (not least to be able to use modern systemic names instead of wlanX, so that pluging in a usb wifi adapter dosent break things)