]> git.ipfire.org Git - thirdparty/hostap.git/commit - src/drivers/driver_nl80211.c
nl80211: Relax bridge setup
authorMichal Kazior <michal@plume.com>
Mon, 28 Oct 2019 12:49:29 +0000 (13:49 +0100)
committerJouni Malinen <j@w1.fi>
Tue, 24 Dec 2019 19:16:23 +0000 (21:16 +0200)
commit8e111157e7ddfbeaf10493f74521093d85a7d0a3
tree675a4d3afcfc7835adb85b20c00f847550d4c223
parent3626e72c8dc1925920130851aa14d285dca66248
nl80211: Relax bridge setup

Normally nl80211 driver will attempt to strictly control what bridge
given interface is put in. It'll attempt to remove it from an existing
bridge if it doesn't match the configured one. If it's not in a bridge
it'll try to put it into one. If any of this fails then hostapd will
bail out and not set up the BSS at all.

Arguably that's reasonable since it allows to set the BSS up coherently
with regard to EAPOL handling as well as allows extra interactions with
things like FDB. However, not all hostapd drivers interact with bridge=
the same way. One example is atheros. Therefore it's not clear what the
desired behavior should be if consistency across drivers is considered.

There's a case where one might want to use a non-native Linux bridge,
e.g., openvswitch, in which case regular ioctls won't work to put an
interface into a bridge, or figure out what bridge an interface is in.
The underlying wireless driver can still be an ordinary nl80211 driver.

This change relaxes the bridge setup failure so that hostapd still
starts even if it fails to add an interface into a configured bridge
name. It still sets up all the necessary sockets (including the
configured bridge=) so EAPOL handling should work fine. This then leaves
it to the system integrator to manage wireless interface as bridge ports
and possibly fdb hints too.

Signed-off-by: Michal Kazior <michal@plume.com>
src/drivers/driver_nl80211.c