diff --git a/hostapd/driver_nl80211.c b/hostapd/driver_nl80211.c index 1bc46b491..4a2d44cd9 100644 --- a/hostapd/driver_nl80211.c +++ b/hostapd/driver_nl80211.c @@ -51,6 +51,7 @@ struct i802_driver_data { struct hostapd_data *hapd; char iface[IFNAMSIZ + 1]; + int bridge; int ioctl_sock; /* socket for ioctl() use */ int wext_sock; /* socket for wireless events */ int eapol_sock; /* socket for EAPOL frames */ @@ -122,6 +123,9 @@ static int have_ifidx(struct i802_driver_data *drv, int ifidx) { int i; + if (ifidx == drv->bridge) + return 1; + for (i = 0; i < drv->num_if_indices; i++) if (drv->if_indices[i] == ifidx) return 1; @@ -2280,6 +2284,7 @@ static void *i802_init_bssid(struct hostapd_data *hapd, const u8 *bssid) drv->num_if_indices = sizeof(drv->default_if_indices) / sizeof(int); drv->if_indices = drv->default_if_indices; + drv->bridge = if_nametoindex(hapd->conf->bridge); if (i802_init_sockets(drv, bssid)) goto failed;