From: Jouni Malinen Date: Thu, 28 May 2009 14:37:47 +0000 (+0300) Subject: Fix STA flag setting for auto-authorization if 802.1X/WPA is not used X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=8077a80042c371c6c79e4f1e576943c2c64a6d4e;p=wpasupplicant Fix STA flag setting for auto-authorization if 802.1X/WPA is not used The authorized flag needs to be added to the set_flags mask to fix the flags_or/_and values that are now used with the new nl80211 attribute. --- diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c index b65b0e2..584cd31 100644 --- a/hostapd/ieee802_11.c +++ b/hostapd/ieee802_11.c @@ -1702,6 +1702,9 @@ static void handle_assoc_cb(struct hostapd_data *hapd, } set_flags = WLAN_STA_SHORT_PREAMBLE | WLAN_STA_WMM | WLAN_STA_MFP; + if (!hapd->conf->ieee802_1x && !hapd->conf->wpa && + sta->flags & WLAN_STA_AUTHORIZED) + set_flags |= WLAN_STA_AUTHORIZED; flags_or = sta->flags & set_flags; flags_and = sta->flags | ~set_flags; hostapd_sta_set_flags(hapd, sta->addr, sta->flags,