Mark STA authorized if IEEE 802.1X and WPA is not used
This fixes multi-BSS configuration with driver_nl80211.c to mark STAs that use secondary BSSes with open/static WEP without having to make driver_nl80211.c track 802.1X configuration for each BSS.
This commit is contained in:
parent
c213cc0433
commit
515cf93f8c
2 changed files with 5 additions and 15 deletions
|
@ -83,7 +83,6 @@ struct i802_driver_data {
|
||||||
struct genl_family *nl80211;
|
struct genl_family *nl80211;
|
||||||
int beacon_int;
|
int beacon_int;
|
||||||
struct i802_bss bss;
|
struct i802_bss bss;
|
||||||
unsigned int ieee802_1x_active:1;
|
|
||||||
unsigned int ht_40mhz_scan:1;
|
unsigned int ht_40mhz_scan:1;
|
||||||
|
|
||||||
int last_freq;
|
int last_freq;
|
||||||
|
@ -875,7 +874,7 @@ static int i802_sta_set_flags(void *priv, const u8 *addr,
|
||||||
if_nametoindex(drv->iface));
|
if_nametoindex(drv->iface));
|
||||||
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
|
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
|
||||||
|
|
||||||
if (total_flags & WLAN_STA_AUTHORIZED || !drv->ieee802_1x_active)
|
if (total_flags & WLAN_STA_AUTHORIZED)
|
||||||
NLA_PUT_FLAG(flags, NL80211_STA_FLAG_AUTHORIZED);
|
NLA_PUT_FLAG(flags, NL80211_STA_FLAG_AUTHORIZED);
|
||||||
|
|
||||||
if (total_flags & WLAN_STA_WMM)
|
if (total_flags & WLAN_STA_WMM)
|
||||||
|
@ -1153,18 +1152,6 @@ static int i802_del_beacon(struct i802_driver_data *drv)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int i802_set_ieee8021x(const char *ifname, void *priv, int enabled)
|
|
||||||
{
|
|
||||||
struct i802_driver_data *drv = priv;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* FIXME: This needs to be per interface (BSS)
|
|
||||||
*/
|
|
||||||
drv->ieee802_1x_active = enabled;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int i802_set_privacy(const char *ifname, void *priv, int enabled)
|
static int i802_set_privacy(const char *ifname, void *priv, int enabled)
|
||||||
{
|
{
|
||||||
struct i802_driver_data *drv = priv;
|
struct i802_driver_data *drv = priv;
|
||||||
|
@ -3009,7 +2996,6 @@ const struct hapd_driver_ops wpa_driver_nl80211_ops = {
|
||||||
.init = i802_init,
|
.init = i802_init,
|
||||||
.init_bssid = i802_init_bssid,
|
.init_bssid = i802_init_bssid,
|
||||||
.deinit = i802_deinit,
|
.deinit = i802_deinit,
|
||||||
.set_ieee8021x = i802_set_ieee8021x,
|
|
||||||
.set_privacy = i802_set_privacy,
|
.set_privacy = i802_set_privacy,
|
||||||
.set_key = i802_set_key,
|
.set_key = i802_set_key,
|
||||||
.get_seqnum = i802_get_seqnum,
|
.get_seqnum = i802_get_seqnum,
|
||||||
|
|
|
@ -1630,6 +1630,10 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
|
||||||
if (sta->flags & WLAN_STA_ASSOC)
|
if (sta->flags & WLAN_STA_ASSOC)
|
||||||
new_assoc = 0;
|
new_assoc = 0;
|
||||||
sta->flags |= WLAN_STA_ASSOC;
|
sta->flags |= WLAN_STA_ASSOC;
|
||||||
|
if (!hapd->conf->ieee802_1x && !hapd->conf->wpa) {
|
||||||
|
/* Open or static WEP; no separate authorization */
|
||||||
|
sta->flags |= WLAN_STA_AUTHORIZED;
|
||||||
|
}
|
||||||
|
|
||||||
if (reassoc)
|
if (reassoc)
|
||||||
mlme_reassociate_indication(hapd, sta);
|
mlme_reassociate_indication(hapd, sta);
|
||||||
|
|
Loading…
Reference in a new issue