Skip to contentSkip to conversation

d80211: fix authentication issues

PATCH Applied Michael Wu 2 participants 4 messages Feb 8, 2007 – Feb 15, 2007 Networking

lore
Share & tools
lore

Michael Wu

author
#0 lore raw

PATCH 1/1 d80211: fix authentication issues

d80211: fix authentication issues

This patch prevents the MLME in d80211 from getting stuck when there is no reply to authentication frames. It also allows the bssid to be correctly set during IEEE80211_AUTHENTICATE.

---

 net/d80211/ieee80211_sta.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
net/d80211/ieee80211_sta.c +4 -1
index feba62b..64dbc79 100644
@@ -453,6 +453,7 @@ static void ieee80211_authenticate(struc
 		printk(KERN_DEBUG "%s: authentication with AP " MAC_FMT
 		       " timed out\n",
 		       dev->name, MAC_ARG(ifsta->bssid));
+		ifsta->state = IEEE80211_DISABLED;
 		return;
 	}
 
@@ -668,6 +669,7 @@ static void ieee80211_associate(struct n
 		printk(KERN_DEBUG "%s: association with AP " MAC_FMT
 		       " timed out\n",
 		       dev->name, MAC_ARG(ifsta->bssid));
+		ifsta->state = IEEE80211_DISABLED;
 		return;
 	}
 
@@ -677,6 +679,7 @@ static void ieee80211_associate(struct n
 	if (ieee80211_privacy_mismatch(dev, ifsta)) {
 		printk(KERN_DEBUG "%s: mismatch in privacy configuration and "
 		       "mixed-cell disabled - abort association\n", dev->name);
+		ifsta->state = IEEE80211_DISABLED;
 		return;
 	}
 
@@ -2355,7 +2358,7 @@ int ieee80211_sta_set_bssid(struct net_d
 		ifsta->bssid_set = 0;
 	else
 		ifsta->bssid_set = 1;
-	if (ifsta->ssid_set && ifsta->state != IEEE80211_AUTHENTICATE)
+	if (ifsta->ssid_set)
 		ieee80211_sta_new_auth(dev, ifsta);
 
 	return 0;
#1 lore raw

net/d80211/ieee80211_sta.c int ieee80211_sta_set_bssid(struct net_d · line 2362

Quoted 7 lines · Michael Wu
net/d80211/ieee80211_sta.c +1 -1
@@ -2355,7 +2358,7 @@ int ieee80211_sta_set_bssid(struct net_d
 		ifsta->bssid_set = 0;
 	else
 		ifsta->bssid_set = 1;
-	if (ifsta->ssid_set && ifsta->state != IEEE80211_AUTHENTICATE)
+	if (ifsta->ssid_set)
 		ieee80211_sta_new_auth(dev, ifsta);

How do you protect against already running ieee80211_associate (called from ieee80211_sta_work)?

Thanks,

Jiri

Signature · 2 lines
Jiri Benc
SUSE Labs
#2 lore raw
Quoted 10 lines · Jiri Benc

net/d80211/ieee80211_sta.c int ieee80211_sta_set_bssid(struct net_d · line 2362

Quoted 7 lines · Michael Wu
net/d80211/ieee80211_sta.c +1 -1
@@ -2355,7 +2358,7 @@ int ieee80211_sta_set_bssid(struct net_d
 		ifsta->bssid_set = 0;
 	else
 		ifsta->bssid_set = 1;
-	if (ifsta->ssid_set && ifsta->state != IEEE80211_AUTHENTICATE)
+	if (ifsta->ssid_set)
 		ieee80211_sta_new_auth(dev, ifsta);

How do you protect against already running ieee80211_associate (called

Sorry, should be ieee80211_authenticate, of course.

Jiri

Signature · 2 lines
Jiri Benc
SUSE Labs
Applied
#3 lore raw
In reply to Michael Wu
Quoted 3 lines · Michael Wu

This patch prevents the MLME in d80211 from getting stuck when there is no reply to authentication frames. It also allows the bssid to be correctly set during IEEE80211_AUTHENTICATE.

Applied to my tree, thanks for the patch!

Jiri

Signature · 2 lines
Jiri Benc
SUSE Labs