[systemd-devel] udev breaks hostap linkage of raw/user interfaces, causing wpa_supplicant problems

Thomas Richter thor at math.tu-berlin.de
Mon Mar 16 09:38:25 PDT 2015


Am 16.03.2015 um 17:25 schrieb David Herrmann:

> Ok, forget my previous mail, your issue is only related to the wext
> driver, not the hostap extensions.
> 
> Up front, upstream udev never renames wlan0 to wlan1. This is a
> downstream problem.
> 
> The problem is the following:
> Kernel hostap creates both, wlan%d and wifi%d net-devs. wpa_supplicant
> doesn't know which is in use and therefore sets wifi%d as secondary
> ifindex for any wlan%d device. That is, if wlan5 is probed and wifi5
> exists, it adds wifi5 as secondary index to wlan5 (see
> wpa_driver_wext_finish_drv_init() in hostap/src/driver_wext.c). This
> is for compatibility with legacy drivers. It is not needed today and
> should be dropped.
> Now if wlan5 *and* wifi5 exist, but are not related, things will go wrong.
> 
> On the kernel side, hostap creates one netdev on device initialization
> (wifi%d in prism2_init_local_data()), and one after probing is done
> (wlan%d in hostap_hw_ready()). Both pass "%d" to the networking core,
> which means, the suffix is allocated dynamically! On both names! If
> you have more than one wireless card, there is no guarantee at all
> that the suffix IDs will be identical for wlan%d and wifi%d. The
> assumption wpa_supplicant places on the kernel-names is just wrong.
> 
> The first netdev-renaming-scheme in udev used to save udev-rules to
> make wlan%d names consistent. This was soon considered broken and
> deprecated. Upstream udev hasn't shipped this for quite a long time.
> 
> I recommend fixing the netdev-renaming rules in debian or telling the
> wpa_supplicant developers, that those netdev suffixes are not stable
> at all. Or update to systemd-udevd.

Thanks, that's approximately what I was afraid of. I reminded the
wpa_supplicant folks again of the problem, then I'll check with the
debian supporter. It's probably all new in sid, but the problem persists
at least in wheezy. I'll come back as soon as I know a bit more.

Greetings,
	Thomas




More information about the systemd-devel mailing list