[systemd-devel] nspawn: where is the code for ieee80211 network adapters

Lennart Poettering lennart at poettering.net
Mon Jan 22 16:22:07 UTC 2018


On Sa, 20.01.18 18:25, guenther kuenzel (mog+freedesktop.org at guuk.eu) wrote:

> 
> hello mailing list,
> 
> i have recently opened a bug report for systemd-nspawn with the
> topic that wireless network adapters are not handled properly by
> systemd-nspawn while LXC is able to handle wireless adapters.
> 
> https://github.com/systemd/systemd/issues/7873
> 
> the bug report got closed with the argument that wifi devices are
> not compatible with network namespaces and the problem is in the
> linux kernel.

Yes, I closed that, since that was at least was what I learnt the last
time I looked into it. If LXC can do this, as you say then we should
be able to support that too.

> so, i started to dig a little bit deeper into the matter. i have to
> point out that i am not a kernel developer or an expert in regards
> to network interfaces and my skills about c/c++ programming are very
> limited.
> 
> my observations so far, i've read the sources for LXC, libvirt, iw
> and docker, is, that there has to be a distinction between the
> handling of ethernet adapters and ieee80211 adapters. what i
> understood so far, in laymans terms, is that you have to move the
> network adapter into the namespace and not the interface. this might
> sound wired for ethernet adapters, because usually the ethernet
> adapter is also the ethernet interface. but this is not true for
> ieee80211 adapters. ieee80211 adapters can have multiple interfaces
> assigned and you can switch the interfaces of an ieee80211
> adapter. this is done to allow ieee80211 adapters to change their
> mode of operations.
> 
> i've tried to identify sutch code in the systemd repository, but
> haven't been able to find it yet. maybe someone can point me to the
> right .c files which cover ieee80211 handling? then i should be able
> to continue with my investigations why my adapter is not recognized
> by systemd-nspawn and should finally be able to raise a proper bug
> report against the kernel.

There is no ieee80211 code in nspawn. We only deal with naked network
interfaces as-is. The code for that is here:

https://github.com/systemd/systemd/blob/master/src/nspawn/nspawn-network.c#L435

To make this work we probably need to query from a wifi interface to
which low-level link iface it belongs and then migrate that instead of
the specified interface. I figure adding a patch for that wouldn't be
too hard, but somebody needs to look closely what needs to be done
there.

Anyway, I have opened the bug again. Sorry for closing it prematurely.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list