提交 c414e84b 编写于 作者: A Al Viro 提交者: David S. Miller

ieee80211softmac_auth_resp() fix

The struct ieee8021_auth * passed to it comes straight from skb->data
without any conversions; members of the struct are little-endian, so
we'd better take that into account when doing switch by auth->algorithm,
etc.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 b16f13d0
......@@ -178,11 +178,11 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth)
}
/* Parse the auth packet */
switch(auth->algorithm) {
switch(le16_to_cpu(auth->algorithm)) {
case WLAN_AUTH_OPEN:
/* Check the status code of the response */
switch(auth->status) {
switch(le16_to_cpu(auth->status)) {
case WLAN_STATUS_SUCCESS:
/* Update the status to Authenticated */
spin_lock_irqsave(&mac->lock, flags);
......@@ -210,7 +210,7 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth)
break;
case WLAN_AUTH_SHARED_KEY:
/* Figure out where we are in the process */
switch(auth->transaction) {
switch(le16_to_cpu(auth->transaction)) {
case IEEE80211SOFTMAC_AUTH_SHARED_CHALLENGE:
/* Check to make sure we have a challenge IE */
data = (u8 *)auth->info_element;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册