aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDedy Lansky <qca_dlansky@qca.qualcomm.com>2016-02-28 13:54:17 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-09 19:03:41 (GMT)
commitf2d6c17aa0f9107a0e8092238b849461447cdd21 (patch)
treebd442039130fd5e6fc0bcd57c16a10fbe91dcbca
parent71fd685fb8d20a199b2c7792ad42b75a12a7ed50 (diff)
downloadhostap-f2d6c17aa0f9107a0e8092238b849461447cdd21.zip
hostap-f2d6c17aa0f9107a0e8092238b849461447cdd21.tar.gz
hostap-f2d6c17aa0f9107a0e8092238b849461447cdd21.tar.bz2
nl80211: Support network hierarchy of a master interface under bridge
Since commit cb05808c46539922cf02e9e8527a062e90637ff9 ('nl80211: Generic Linux master interface support for hostapd'), hostapd is listening for EAPOL frames on any master which the interface is enslaved under. This commit allows hostapd to support network hierarchy in which the interface is enslaved under some master which in turn is enslaved under a bridge. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
-rw-r--r--src/drivers/driver_nl80211.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 570dee6..5fb6652 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -5912,6 +5912,14 @@ static void *i802_init(struct hostapd_data *hapd,
params->ifname, master_ifname);
/* start listening for EAPOL on the master interface */
add_ifidx(drv, if_nametoindex(master_ifname), drv->ifindex);
+
+ /* check if master itself is under bridge */
+ if (linux_br_get(master_ifname, master_ifname) == 0) {
+ wpa_printf(MSG_DEBUG, "nl80211: which is in bridge %s",
+ master_ifname);
+ br_ifindex = if_nametoindex(master_ifname);
+ os_strlcpy(bss->brname, master_ifname, IFNAMSIZ);
+ }
} else {
master_ifname[0] = '\0';
}