Parcourir la source

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>
Dedy Lansky il y a 9 ans
Parent
commit
f2d6c17aa0
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      src/drivers/driver_nl80211.c

+ 8 - 0
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';
 	}