nl80211: Support network hierarchy of a master interface under bridge

Since commit cb05808c46 ('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>
This commit is contained in:
Dedy Lansky 2016-02-28 15:54:17 +02:00 committed by Jouni Malinen
parent 71fd685fb8
commit f2d6c17aa0

View file

@ -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';
}