linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
@ 2011-04-02  1:36 Bing Zhao
  2011-04-02  1:36 ` [PATCH 2/2] mwifiex: remove redundant encryption_mode mapping Bing Zhao
  2011-04-03  8:02 ` [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2 Johannes Berg
  0 siblings, 2 replies; 8+ messages in thread
From: Bing Zhao @ 2011-04-02  1:36 UTC (permalink / raw)
  To: linux-wireless
  Cc: John W. Linville, Johannes Berg, Amitkumar Karwar, Kiran Divekar,
	Yogesh Powar, Marc Yang, Frank Huang, Bing Zhao

From: Amitkumar Karwar <akarwar@marvell.com>

When testing wpa_supplicant with 'nl80211' driver to connect
to an AP with WPA/WPA2 security, we notice the followings:

1) add_key is called firstly with the key from cfg80211
2) set_defaut_key is called next

set_default_key() is specific to WEP keys and should not be
called in case of WPA/WPA2 security. The set_default_key()
won't be called if wpa_supplicant uses "-Dwext" option,
but it's been called if "-Dnl80211" option is specified.

We can fix this issue by adding a check to return from
set_default_key() if WEP key is not configured.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/net/wireless/mwifiex/cfg80211.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 2d96800..4ac4f5a 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -228,6 +228,10 @@ mwifiex_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *netdev,
 	struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy);
 	int ret;
 
+	/* Return if WEP key not configured */
+	if (priv->sec_info.wep_status == MWIFIEX_802_11_WEP_DISABLED)
+		return 0;
+
 	ret = mwifiex_set_encode(priv, NULL, 0, key_index, 0);
 
 	wiphy_dbg(wiphy, "info: set default Tx key index\n");
-- 
1.7.0.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] mwifiex: remove redundant encryption_mode mapping
  2011-04-02  1:36 [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2 Bing Zhao
@ 2011-04-02  1:36 ` Bing Zhao
  2011-04-03  8:02 ` [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2 Johannes Berg
  1 sibling, 0 replies; 8+ messages in thread
From: Bing Zhao @ 2011-04-02  1:36 UTC (permalink / raw)
  To: linux-wireless
  Cc: John W. Linville, Johannes Berg, Amitkumar Karwar, Kiran Divekar,
	Yogesh Powar, Marc Yang, Frank Huang, Bing Zhao

From: Yogesh Ashok Powar <yogeshp@marvell.com>

remove MWIFIEX_ENCRYPTION_MODE_ and use WLAN_CIPHER_SUITE_
macros directly

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/net/wireless/mwifiex/cfg80211.c  |   76 ++++--------------------------
 drivers/net/wireless/mwifiex/init.c      |    2 +-
 drivers/net/wireless/mwifiex/ioctl.h     |    8 ---
 drivers/net/wireless/mwifiex/join.c      |    2 +-
 drivers/net/wireless/mwifiex/scan.c      |   12 ++--
 drivers/net/wireless/mwifiex/sta_event.c |    2 +-
 6 files changed, 19 insertions(+), 83 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 4ac4f5a..ec0895f 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -90,8 +90,8 @@ mwifiex_is_alg_wep(u32 cipher)
 	int alg = 0;
 
 	switch (cipher) {
-	case MWIFIEX_ENCRYPTION_MODE_WEP40:
-	case MWIFIEX_ENCRYPTION_MODE_WEP104:
+	case WLAN_CIPHER_SUITE_WEP40:
+	case WLAN_CIPHER_SUITE_WEP104:
 		alg = 1;
 		break;
 	default:
@@ -102,55 +102,6 @@ mwifiex_is_alg_wep(u32 cipher)
 }
 
 /*
- * This function maps the given cipher type into driver specific type.
- *
- * It also sets a flag to indicate whether WPA is enabled or not.
- *
- * The mapping table is -
- *      Input cipher                Driver cipher type              WPA enabled?
- *      ------------                ------------------              ------------
- *      IW_AUTH_CIPHER_NONE         MWIFIEX_ENCRYPTION_MODE_NONE    No
- *      WLAN_CIPHER_SUITE_WEP40     MWIFIEX_ENCRYPTION_MODE_WEP40   No
- *      WLAN_CIPHER_SUITE_WEP104    MWIFIEX_ENCRYPTION_MODE_WEP104  No
- *      WLAN_CIPHER_SUITE_TKIP      MWIFIEX_ENCRYPTION_MODE_TKIP    Yes
- *      WLAN_CIPHER_SUITE_CCMP      MWIFIEX_ENCRYPTION_MODE_CCMP    Yes
- *      Others                      -1                              No
- */
-static int
-mwifiex_get_mwifiex_cipher(u32 cipher, int *wpa_enabled)
-{
-	int encrypt_mode;
-
-	if (wpa_enabled)
-		*wpa_enabled = 0;
-	switch (cipher) {
-	case IW_AUTH_CIPHER_NONE:
-		encrypt_mode = MWIFIEX_ENCRYPTION_MODE_NONE;
-		break;
-	case WLAN_CIPHER_SUITE_WEP40:
-		encrypt_mode = MWIFIEX_ENCRYPTION_MODE_WEP40;
-		break;
-	case WLAN_CIPHER_SUITE_WEP104:
-		encrypt_mode = MWIFIEX_ENCRYPTION_MODE_WEP104;
-		break;
-	case WLAN_CIPHER_SUITE_TKIP:
-		encrypt_mode = MWIFIEX_ENCRYPTION_MODE_TKIP;
-		if (wpa_enabled)
-			*wpa_enabled = 1;
-		break;
-	case WLAN_CIPHER_SUITE_CCMP:
-		encrypt_mode = MWIFIEX_ENCRYPTION_MODE_CCMP;
-		if (wpa_enabled)
-			*wpa_enabled = 1;
-		break;
-	default:
-		encrypt_mode = -1;
-	}
-
-	return encrypt_mode;
-}
-
-/*
  * This function retrieves the private structure from kernel wiphy structure.
  */
 static void *mwifiex_cfg80211_get_priv(struct wiphy *wiphy)
@@ -252,13 +203,9 @@ mwifiex_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
 {
 	struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy);
 	int ret = 0;
-	int encrypt_mode;
-
-	encrypt_mode = mwifiex_get_mwifiex_cipher(params->cipher, NULL);
 
-	if (encrypt_mode != -1)
-		ret = mwifiex_set_encode(priv, params->key, params->key_len,
-						key_index, 0);
+	ret = mwifiex_set_encode(priv, params->key, params->key_len,
+								key_index, 0);
 
 	wiphy_dbg(wiphy, "info: crypto keys added\n");
 
@@ -1019,7 +966,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 	struct mwifiex_802_11_ssid req_ssid;
 	struct mwifiex_ssid_bssid ssid_bssid;
 	int ret = 0;
-	int auth_type = 0, pairwise_encrypt_mode = 0, wpa_enabled = 0;
+	int auth_type = 0, pairwise_encrypt_mode = 0;
 	int group_encrypt_mode = 0;
 	int alg_is_wep = 0;
 
@@ -1052,13 +999,13 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 		/* "privacy" is set only for ad-hoc mode */
 		if (privacy) {
 			/*
-			 * Keep MWIFIEX_ENCRYPTION_MODE_WEP104 for now so that
+			 * Keep WLAN_CIPHER_SUITE_WEP104 for now so that
 			 * the firmware can find a matching network from the
 			 * scan. The cfg80211 does not give us the encryption
 			 * mode at this stage so just setting it to WEP here.
 			 */
 			priv->sec_info.encryption_mode =
-					MWIFIEX_ENCRYPTION_MODE_WEP104;
+					WLAN_CIPHER_SUITE_WEP104;
 			priv->sec_info.authentication_mode =
 					NL80211_AUTHTYPE_OPEN_SYSTEM;
 		}
@@ -1074,16 +1021,13 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 		auth_type = NL80211_AUTHTYPE_SHARED_KEY;
 
 	if (sme->crypto.n_ciphers_pairwise) {
-		pairwise_encrypt_mode = mwifiex_get_mwifiex_cipher(sme->crypto.
-					ciphers_pairwise[0], &wpa_enabled);
-		priv->sec_info.encryption_mode = pairwise_encrypt_mode;
+		priv->sec_info.encryption_mode =
+						sme->crypto.ciphers_pairwise[0];
 		priv->sec_info.authentication_mode = auth_type;
 	}
 
 	if (sme->crypto.cipher_group) {
-		group_encrypt_mode = mwifiex_get_mwifiex_cipher(sme->crypto.
-						   cipher_group, &wpa_enabled);
-		priv->sec_info.encryption_mode = group_encrypt_mode;
+		priv->sec_info.encryption_mode = sme->crypto.cipher_group;
 		priv->sec_info.authentication_mode = auth_type;
 	}
 	if (sme->ie)
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 43ea87d..8189862 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -86,7 +86,7 @@ static int mwifiex_init_priv(struct mwifiex_private *priv)
 
 	priv->sec_info.wep_status = MWIFIEX_802_11_WEP_DISABLED;
 	priv->sec_info.authentication_mode = NL80211_AUTHTYPE_OPEN_SYSTEM;
-	priv->sec_info.encryption_mode = MWIFIEX_ENCRYPTION_MODE_NONE;
+	priv->sec_info.encryption_mode = 0;
 	for (i = 0; i < ARRAY_SIZE(priv->wep_key); i++)
 		memset(&priv->wep_key[i], 0, sizeof(struct mwifiex_wep_key));
 	priv->wep_key_curr_index = 0;
diff --git a/drivers/net/wireless/mwifiex/ioctl.h b/drivers/net/wireless/mwifiex/ioctl.h
index d01160a..703a6d1 100644
--- a/drivers/net/wireless/mwifiex/ioctl.h
+++ b/drivers/net/wireless/mwifiex/ioctl.h
@@ -267,14 +267,6 @@ struct mwifiex_debug_info {
 	u8 event_received;
 };
 
-enum {
-	MWIFIEX_ENCRYPTION_MODE_NONE = 0,
-	MWIFIEX_ENCRYPTION_MODE_WEP40 = 1,
-	MWIFIEX_ENCRYPTION_MODE_TKIP = 2,
-	MWIFIEX_ENCRYPTION_MODE_CCMP = 3,
-	MWIFIEX_ENCRYPTION_MODE_WEP104 = 4,
-};
-
 #define MWIFIEX_KEY_INDEX_UNICAST	0x40000000
 #define MWIFIEX_MAX_KEY_LENGTH		32
 #define WAPI_RXPN_LEN			16
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index 8a1eb2a..7a9e0b5 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -869,7 +869,7 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
 	tmp_cap |= WLAN_CAPABILITY_IBSS;
 
 	/* Set up privacy in bss_desc */
-	if (priv->sec_info.encryption_mode != MWIFIEX_ENCRYPTION_MODE_NONE) {
+	if (priv->sec_info.encryption_mode) {
 		/* Ad-Hoc capability privacy on */
 		dev_dbg(adapter->dev,
 			"info: ADHOC_S_CMD: wep_status set privacy to WEP\n");
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 64ed60a..6bb52d0 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -273,8 +273,8 @@ mwifiex_is_network_compatible_for_no_sec(struct mwifiex_private *priv,
 	    && ((!bss_desc->bcn_rsn_ie) ||
 		((*(bss_desc->bcn_rsn_ie)).ieee_hdr.element_id !=
 	    WLAN_EID_RSN))
-	    && priv->sec_info.encryption_mode ==
-	    MWIFIEX_ENCRYPTION_MODE_NONE && !bss_desc->privacy) {
+	    && !priv->sec_info.encryption_mode
+	    && !bss_desc->privacy) {
 		return true;
 	}
 	return false;
@@ -386,8 +386,8 @@ mwifiex_is_network_compatible_for_adhoc_aes(struct mwifiex_private *priv,
 		   element_id != WLAN_EID_WPA))
 	    && ((!bss_desc->bcn_rsn_ie) || ((*(bss_desc->bcn_rsn_ie)).ieee_hdr.
 		   element_id != WLAN_EID_RSN))
-	    && priv->sec_info.encryption_mode ==
-	    MWIFIEX_ENCRYPTION_MODE_NONE && bss_desc->privacy) {
+	    && !priv->sec_info.encryption_mode
+	    && bss_desc->privacy) {
 		return true;
 	}
 	return false;
@@ -408,8 +408,8 @@ mwifiex_is_network_compatible_for_dynamic_wep(struct mwifiex_private *priv,
 		   element_id != WLAN_EID_WPA))
 	    && ((!bss_desc->bcn_rsn_ie) || ((*(bss_desc->bcn_rsn_ie)).ieee_hdr.
 		   element_id != WLAN_EID_RSN))
-	    && priv->sec_info.encryption_mode !=
-	    MWIFIEX_ENCRYPTION_MODE_NONE && bss_desc->privacy) {
+	    && priv->sec_info.encryption_mode
+	    && bss_desc->privacy) {
 		dev_dbg(priv->adapter->dev, "info: %s: dynamic "
 			"WEP: index=%d wpa_ie=%#x wpa2_ie=%#x "
 			"EncMode=%#x privacy=%#x\n",
diff --git a/drivers/net/wireless/mwifiex/sta_event.c b/drivers/net/wireless/mwifiex/sta_event.c
index 0187185..936d7c1 100644
--- a/drivers/net/wireless/mwifiex/sta_event.c
+++ b/drivers/net/wireless/mwifiex/sta_event.c
@@ -76,7 +76,7 @@ mwifiex_reset_connect_state(struct mwifiex_private *priv)
 	priv->wapi_ie_len = 0;
 	priv->sec_info.wapi_key_on = false;
 
-	priv->sec_info.encryption_mode = MWIFIEX_ENCRYPTION_MODE_NONE;
+	priv->sec_info.encryption_mode = 0;
 
 	/* Enable auto data rate */
 	priv->is_data_rate_auto = true;
-- 
1.7.0.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
  2011-04-02  1:36 [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2 Bing Zhao
  2011-04-02  1:36 ` [PATCH 2/2] mwifiex: remove redundant encryption_mode mapping Bing Zhao
@ 2011-04-03  8:02 ` Johannes Berg
  2011-04-03  8:37   ` Johannes Berg
  1 sibling, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2011-04-03  8:02 UTC (permalink / raw)
  To: Bing Zhao
  Cc: linux-wireless, John W. Linville, Amitkumar Karwar, Kiran Divekar,
	Yogesh Powar, Marc Yang, Frank Huang, Jouni Malinen

On Fri, 2011-04-01 at 18:36 -0700, Bing Zhao wrote:
> From: Amitkumar Karwar <akarwar@marvell.com>
> 
> When testing wpa_supplicant with 'nl80211' driver to connect
> to an AP with WPA/WPA2 security, we notice the followings:
> 
> 1) add_key is called firstly with the key from cfg80211
> 2) set_defaut_key is called next
> 
> set_default_key() is specific to WEP keys and should not be
> called in case of WPA/WPA2 security. The set_default_key()
> won't be called if wpa_supplicant uses "-Dwext" option,
> but it's been called if "-Dnl80211" option is specified.
> 
> We can fix this issue by adding a check to return from
> set_default_key() if WEP key is not configured.

Hmmm. Yeah this seems like it shouldn't be happening, but maybe checking
should be in cfg80211 and it should reject the supplicant's call?

johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
  2011-04-03  8:02 ` [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2 Johannes Berg
@ 2011-04-03  8:37   ` Johannes Berg
  2011-04-05 18:45     ` Bing Zhao
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2011-04-03  8:37 UTC (permalink / raw)
  To: Bing Zhao
  Cc: linux-wireless, John W. Linville, Amitkumar Karwar, Kiran Divekar,
	Yogesh Powar, Marc Yang, Frank Huang, Jouni Malinen

On Sun, 2011-04-03 at 10:02 +0200, Johannes Berg wrote:
> On Fri, 2011-04-01 at 18:36 -0700, Bing Zhao wrote:
> > From: Amitkumar Karwar <akarwar@marvell.com>
> > 
> > When testing wpa_supplicant with 'nl80211' driver to connect
> > to an AP with WPA/WPA2 security, we notice the followings:
> > 
> > 1) add_key is called firstly with the key from cfg80211
> > 2) set_defaut_key is called next
> > 
> > set_default_key() is specific to WEP keys and should not be
> > called in case of WPA/WPA2 security. The set_default_key()
> > won't be called if wpa_supplicant uses "-Dwext" option,
> > but it's been called if "-Dnl80211" option is specified.
> > 
> > We can fix this issue by adding a check to return from
> > set_default_key() if WEP key is not configured.
> 
> Hmmm. Yeah this seems like it shouldn't be happening, but maybe checking
> should be in cfg80211 and it should reject the supplicant's call?

Ok Jouni and I just discussed this briefly, and it looks like there is
indeed a special case where the GTK is also set as the default TX key:
this case is when the station requested "no pairwise" or when the AP did
the same thing in the configuration.

Is it possible that this just happens to be the case in your tests? It
looks like that would be rather strange, but that's a corner case where
the supplicant would possibly set the GTK as the default key.

In any case, this patch seems wrong in that you should never return
success if the operation actually failed.

johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
  2011-04-03  8:37   ` Johannes Berg
@ 2011-04-05 18:45     ` Bing Zhao
  2011-04-05 18:53       ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Bing Zhao @ 2011-04-05 18:45 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-wireless@vger.kernel.org, John W. Linville,
	Amitkumar Karwar, Kiran Divekar, Yogesh Powar, Marc Yang,
	Frank Huang, Jouni Malinen

[-- Attachment #1: Type: text/plain, Size: 2663 bytes --]

Hi Johannes,

> -----Original Message-----
> From: Johannes Berg [mailto:johannes@sipsolutions.net]
> Sent: Sunday, April 03, 2011 1:37 AM
> To: Bing Zhao
> Cc: linux-wireless@vger.kernel.org; John W. Linville; Amitkumar Karwar; Kiran Divekar; Yogesh Powar;
> Marc Yang; Frank Huang; Jouni Malinen
> Subject: Re: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
> 
> On Sun, 2011-04-03 at 10:02 +0200, Johannes Berg wrote:
> > On Fri, 2011-04-01 at 18:36 -0700, Bing Zhao wrote:
> > > From: Amitkumar Karwar <akarwar@marvell.com>
> > >
> > > When testing wpa_supplicant with 'nl80211' driver to connect
> > > to an AP with WPA/WPA2 security, we notice the followings:
> > >
> > > 1) add_key is called firstly with the key from cfg80211
> > > 2) set_defaut_key is called next
> > >
> > > set_default_key() is specific to WEP keys and should not be
> > > called in case of WPA/WPA2 security. The set_default_key()
> > > won't be called if wpa_supplicant uses "-Dwext" option,
> > > but it's been called if "-Dnl80211" option is specified.
> > >
> > > We can fix this issue by adding a check to return from
> > > set_default_key() if WEP key is not configured.
> >
> > Hmmm. Yeah this seems like it shouldn't be happening, but maybe checking
> > should be in cfg80211 and it should reject the supplicant's call?

In wext-compat.c, set_default_key() is called only in WEP security.
In nl80211.c, there isn't such checking.

> 
> Ok Jouni and I just discussed this briefly, and it looks like there is
> indeed a special case where the GTK is also set as the default TX key:
> this case is when the station requested "no pairwise" or when the AP did
> the same thing in the configuration.

From the wpa_supplicant debug log generated by Amit, it seems that set_default_key() is called while installing PTK to the driver. Is it expected?

WPA: Installing PTK to the driver.
WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_driver_nl80211_set_key: ifindex=12 alg=2 addr=0x80a7168 key_idx=0 set_tx=1 seq_len=6 key_len=32
   addr=00:1b:2f:55:79:7e

The complete log file is attached for your reference.

> 
> Is it possible that this just happens to be the case in your tests? It
> looks like that would be rather strange, but that's a corner case where
> the supplicant would possibly set the GTK as the default key.

Not the same corner case. In our test both pairwise and groupwise are configured.

> 
> In any case, this patch seems wrong in that you should never return
> success if the operation actually failed.

Could you please advise how we should resolve this?

Thanks,

Bing


[-- Attachment #2: wpa_supplicant-nl80211.log --]
[-- Type: application/octet-stream, Size: 19366 bytes --]

[root@pe-lt343 wpa_supplicant]# ./wpa_supplicant -dd -Dnl80211 -imlan0 -c /etc/wpa_supplicant/wpa1_tkip_psk.conf 
Initializing interface 'mlan0' conf '/etc/wpa_supplicant/wpa1_tkip_psk.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa1_tkip_psk.conf' -> '/etc/wpa_supplicant/wpa1_tkip_psk.conf'
Reading configuration file '/etc/wpa_supplicant/wpa1_tkip_psk.conf'
Line: 2 - start of a new network block
ssid - hexdump_ascii(len=9):
     56 61 6d 73 69 74 65 6d 70                        Vamsitemp       
key_mgmt: 0x2
proto: 0x1
pairwise: 0x8
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Line 8: removed CCMP from group cipher list since it was not allowed for pairwise cipher
Priority group 0
   id=0 ssid='Vamsitemp'
netlink: Operstate: linkmode=1, operstate=5
nl80211: Register Action command failed: ret=-95 (Operation not supported)
nl80211: Register Action match - hexdump(len=1): 06
nl80211: Failed to register Action frame processing - ignore for now
Own MAC address: 00:50:43:21:03:bd
wpa_driver_nl80211_set_key: ifindex=12 alg=0 addr=0x8091977 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=12 alg=0 addr=0x8091977 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=12 alg=0 addr=0x8091977 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=12 alg=0 addr=0x8091977 key_idx=3 set_tx=0 seq_len=0 key_len=0
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
Added interface mlan0
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mlan0' added
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
Scan requested (ret=0) - scan timeout 10 seconds
nl80211: Event message available
nl80211: Scan trigger
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
nl80211: Event message available
nl80211: New scan results available
Received scan results (26 BSSes)
BSS: Start scan result update 1
BSS: Add new id 0 BSSID 00:21:19:ea:5e:8c SSID 'MWorld-Softplug-1'
BSS: Add new id 1 BSSID 00:1b:2f:50:78:02 SSID 'NETGEAR101'
BSS: Add new id 2 BSSID 00:23:04:2e:7f:30 SSID 'Restricted - Employees Only'
BSS: Add new id 3 BSSID 00:23:04:2d:9e:30 SSID 'Restricted - Employees Only'
BSS: Add new id 4 BSSID 00:50:43:20:cb:18 SSID 'Marvell-WMG-88-cb18'
BSS: Add new id 5 BSSID 00:50:43:21:1a:dc SSID 'zigsig'
BSS: Add new id 6 BSSID 02:50:43:c3:bd:14 SSID 'Sandip'
BSS: Add new id 7 BSSID 00:1b:2f:55:79:7e SSID 'Vamsitemp'
BSS: Add new id 8 BSSID 00:50:43:21:09:5f SSID 'ks_ap'
BSS: Add new id 9 BSSID 00:50:43:20:cb:17 SSID 'Marvell-WMG-88-Pune1'
BSS: Add new id 10 BSSID 06:50:43:20:cb:17 SSID 'Marvell-WMG-88-Pune2'
BSS: Add new id 11 BSSID 00:50:43:21:09:61 SSID 'Marvell-mjain-5d8b'
BSS: Add new id 12 BSSID 00:1e:58:fe:e1:c8 SSID 'Native 802.11 AP'
BSS: Add new id 13 BSSID 00:1f:33:27:b6:ba SSID 'NETGEAR_WGR614'
BSS: Add new id 14 BSSID 6e:49:7c:8f:77:34 SSID 'smartoutlet-24-9E-B5'
BSS: Add new id 15 BSSID 02:24:84:5a:ff:53 SSID 'Pradeep'
BSS: Add new id 16 BSSID 02:50:43:52:21:45 SSID 'calypso_mfgtest'
BSS: Add new id 17 BSSID 02:25:55:81:bf:7d SSID 'MRVL_ADHOCf2ace0'
BSS: Add new id 18 BSSID 00:50:43:21:10:c4 SSID 'test0'
BSS: Add new id 19 BSSID 00:50:43:20:cb:39 SSID 'yogesh'
BSS: Add new id 20 BSSID 00:50:43:21:10:c5 SSID 'test1'
BSS: Add new id 21 BSSID 00:50:43:28:38:28 SSID 'ro'
BSS: Add new id 22 BSSID 00:1f:ca:d8:51:f0 SSID 'PN-CiscoAP'
BSS: Add new id 23 BSSID 00:23:12:f7:c2:bb SSID 'White Apple'
BSS: Add new id 24 BSSID 02:53:14:16:0e:ae SSID 'print server 2EF440'
BSS: Add new id 25 BSSID 02:22:f2:56:4b:56 SSID 'thermostat-2D-94-E4'
New scan results available
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:21:19:ea:5e:8c ssid='MWorld-Softplug-1' wpa_ie_len=0 rsn_ie_len=20 caps=0x431
   skip - SSID mismatch
1: 00:1b:2f:50:78:02 ssid='NETGEAR101' wpa_ie_len=0 rsn_ie_len=20 caps=0x431
   skip - SSID mismatch
2: 00:23:04:2e:7f:30 ssid='Restricted - Employees Only' wpa_ie_len=24 rsn_ie_len=20 caps=0x31
   skip - SSID mismatch
3: 00:23:04:2d:9e:30 ssid='Restricted - Employees Only' wpa_ie_len=24 rsn_ie_len=20 caps=0x431
   skip - SSID mismatch
4: 00:50:43:20:cb:18 ssid='Marvell-WMG-88-cb18' wpa_ie_len=0 rsn_ie_len=20 caps=0x31
   skip - SSID mismatch
5: 00:50:43:21:1a:dc ssid='zigsig' wpa_ie_len=0 rsn_ie_len=20 caps=0x431
   skip - SSID mismatch
6: 02:50:43:c3:bd:14 ssid='Sandip' wpa_ie_len=0 rsn_ie_len=20 caps=0x431
   skip - SSID mismatch
7: 00:1b:2f:55:79:7e ssid='Vamsitemp' wpa_ie_len=22 rsn_ie_len=0 caps=0x411
   selected based on WPA IE
   selected WPA AP 00:1b:2f:55:79:7e ssid='Vamsitemp'
Trying to associate with 00:1b:2f:55:79:7e (SSID='Vamsitemp' freq=2457 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2 proto 1
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
No keys have been configured - skip key clearing
State: SCANNING -> ASSOCIATING
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
nl80211: Connect (ifindex=12)
  * bssid=00:1b:2f:55:79:7e
  * freq=2457
  * SSID - hexdump_ascii(len=9):
     56 61 6d 73 69 74 65 6d 70                        Vamsitemp       
  * IEs - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
  * Auth Type 0
  * WPA Version 1
nl80211: Connect request send successfully
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mlan0' added
nl80211: Event message available
Association info event
State: ASSOCIATING -> ASSOCIATED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
Associated to a new BSS: BSSID=00:1b:2f:55:79:7e
No keys have been configured - skip key clearing
Associated with 00:1b:2f:55:79:7e
WPA: Association event - clear replay counter
WPA: Clear old PTK
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: enable timer tick
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
Cancelling scan request
RX EAPOL from 00:1b:2f:55:79:7e
RX EAPOL - hexdump(len=176): 01 03 00 5f fe 00 89 00 20 00 00 00 00 00 00 00 01 57 37 96 a9 ba b9 40 a3 74 70 73 80 0b be 72 a8 f1 7b 1a 42 9c 88 84 a5 7c 5e fd 21 27 81 45 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Setting authentication timeout: 10 sec 0 usec
IEEE 802.1X RX: version=1 type=3 length=95
  EAPOL-Key type=254
  key_info 0x89 (ver=1 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=32 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
  key_nonce - hexdump(len=32): 57 37 96 a9 ba b9 40 a3 74 70 73 80 0b be 72 a8 f1 7b 1a 42 9c 88 84 a5 7c 5e fd 21 27 81 45 3e
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=176): 01 03 00 5f fe 00 89 00 20 00 00 00 00 00 00 00 01 57 37 96 a9 ba b9 40 a3 74 70 73 80 0b be 72 a8 f1 7b 1a 42 9c 88 84 a5 7c 5e fd 21 27 81 45 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: ignoring 77 bytes after the IEEE 802.1X data
State: ASSOCIATED -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:1b:2f:55:79:7e (ver=1)
WPA: Renewed SNonce - hexdump(len=32): 44 5f c2 5b d1 43 6a 2d eb f6 7f c9 4f ce 87 de e5 aa 5a 8e 0b ff 81 08 95 e8 44 ae 8b 49 b9 ba
WPA: PTK derivation - A1=00:50:43:21:03:bd A2=00:1b:2f:55:79:7e
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
WPA: Sending EAPOL-Key 2/4
WPA: TX EAPOL-Key - hexdump(len=123): 01 03 00 77 fe 01 09 00 20 00 00 00 00 00 00 00 01 44 5f c2 5b d1 43 6a 2d eb f6 7f c9 4f ce 87 de e5 aa 5a 8e 0b ff 81 08 95 e8 44 ae 8b 49 b9 ba 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 db 8c 0a 01 15 51 24 f3 48 cc 01 0d c5 f6 0e 04 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
RX EAPOL from 00:1b:2f:55:79:7e
RX EAPOL - hexdump(len=176): 01 03 00 77 fe 01 c9 00 20 00 00 00 00 00 00 00 02 57 37 96 a9 ba b9 40 a3 74 70 73 80 0b be 72 a8 f1 7b 1a 42 9c 88 84 a5 7c 5e fd 21 27 81 45 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c9 12 ee ef 49 c7 b0 b8 c3 8b 26 1e 8b 98 87 d8 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02 da 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
IEEE 802.1X RX: version=1 type=3 length=119
  EAPOL-Key type=254
  key_info 0x1c9 (ver=1 keyidx=0 rsvd=0 Pairwise Install Ack MIC)
  key_length=32 key_data_length=24
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02
  key_nonce - hexdump(len=32): 57 37 96 a9 ba b9 40 a3 74 70 73 80 0b be 72 a8 f1 7b 1a 42 9c 88 84 a5 7c 5e fd 21 27 81 45 3e
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): c9 12 ee ef 49 c7 b0 b8 c3 8b 26 1e 8b 98 87 d8
WPA: RX EAPOL-Key - hexdump(len=176): 01 03 00 77 fe 01 c9 00 20 00 00 00 00 00 00 00 02 57 37 96 a9 ba b9 40 a3 74 70 73 80 0b be 72 a8 f1 7b 1a 42 9c 88 84 a5 7c 5e fd 21 27 81 45 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c9 12 ee ef 49 c7 b0 b8 c3 8b 26 1e 8b 98 87 d8 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02 da 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: ignoring 53 bytes after the IEEE 802.1X data
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 3 of 4-Way Handshake from 00:1b:2f:55:79:7e (ver=1)
WPA: IE KeyData - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
WPA: WPA IE in EAPOL-Key - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
WPA: Sending EAPOL-Key 4/4
WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 01 09 00 20 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5c 1e 4c c8 8f af 75 02 f5 93 11 ae 68 76 68 4f 00 00
WPA: Installing PTK to the driver.
WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_driver_nl80211_set_key: ifindex=12 alg=2 addr=0x80a7168 key_idx=0 set_tx=1 seq_len=6 key_len=32
   addr=00:1b:2f:55:79:7e
State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE
RX EAPOL from 00:1b:2f:55:79:7e
RX EAPOL - hexdump(len=176): 01 03 00 7f fe 03 a1 00 20 00 00 00 00 00 00 00 03 ca 33 2d 33 c7 13 50 e8 ec 2a c1 e9 1e 14 1b d1 0e 0b a9 04 ce e9 5e 22 2b 9a 9d 20 3e 85 ad cc 99 87 80 15 22 0e 5f 1a 72 ef 82 b4 f5 c0 6f 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 94 84 0e c0 84 2a 13 9d 27 81 cb ea e3 8a d6 b8 00 20 b9 6b 5b bd 98 6d 16 3c 68 25 f0 1d e1 6c 8c c3 c7 22 10 2e 05 97 5f 5a 16 ed f2 8f 4b 0f 96 15 5d e0 d9 b8 3b 34 00 b0 54 a9 64 0d 10 c8 17 0a f6 8e b9 e5 e5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
IEEE 802.1X RX: version=1 type=3 length=127
  EAPOL-Key type=254
  key_info 0x3a1 (ver=1 keyidx=2 rsvd=0 Group Ack MIC Secure)
  key_length=32 key_data_length=32
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 03
  key_nonce - hexdump(len=32): ca 33 2d 33 c7 13 50 e8 ec 2a c1 e9 1e 14 1b d1 0e 0b a9 04 ce e9 5e 22 2b 9a 9d 20 3e 85 ad cc
  key_iv - hexdump(len=16): 99 87 80 15 22 0e 5f 1a 72 ef 82 b4 f5 c0 6f 49
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 94 84 0e c0 84 2a 13 9d 27 81 cb ea e3 8a d6 b8
WPA: RX EAPOL-Key - hexdump(len=176): 01 03 00 7f fe 03 a1 00 20 00 00 00 00 00 00 00 03 ca 33 2d 33 c7 13 50 e8 ec 2a c1 e9 1e 14 1b d1 0e 0b a9 04 ce e9 5e 22 2b 9a 9d 20 3e 85 ad cc 99 87 80 15 22 0e 5f 1a 72 ef 82 b4 f5 c0 6f 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 94 84 0e c0 84 2a 13 9d 27 81 cb ea e3 8a d6 b8 00 20 b9 6b 5b bd 98 6d 16 3c 68 25 f0 1d e1 6c 8c c3 c7 22 10 2e 05 97 5f 5a 16 ed f2 8f 4b 0f 96 15 5d e0 d9 b8 3b 34 00 b0 54 a9 64 0d 10 c8 17 0a f6 8e b9 e5 e5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: ignoring 45 bytes after the IEEE 802.1X data
WPA: RX message 1 of Group Key Handshake from 00:1b:2f:55:79:7e (ver=1)
State: GROUP_HANDSHAKE -> GROUP_HANDSHAKE
WPA: Group Key - hexdump(len=32): [REMOVED]
WPA: Installing GTK to the driver (keyidx=2 tx=0 len=32).
WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_driver_nl80211_set_key: ifindex=12 alg=2 addr=0x8091977 key_idx=2 set_tx=0 seq_len=6 key_len=32
WPA: Sending EAPOL-Key 2/2
WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 03 21 00 20 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2c 7f 57 76 3e db 71 62 9c d0 95 e3 66 7e 97 f5 00 00
WPA: Key negotiation completed with 00:1b:2f:55:79:7e [PTK=TKIP GTK=TKIP]
Cancelling authentication timeout
State: GROUP_HANDSHAKE -> COMPLETED
CTRL-EVENT-CONNECTED - Connection to 00:1b:2f:55:79:7e completed (auth) [id=0 id_str=]
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
EAPOL: External notification - portValid=1
EAPOL: External notification - EAP success=1
EAPOL: SUPP_PAE entering state AUTHENTICATING
EAPOL: SUPP_BE entering state SUCCESS
EAP: EAP entering state DISABLED
EAPOL: SUPP_PAE entering state AUTHENTICATED
EAPOL: Supplicant port status: Authorized
EAPOL: SUPP_BE entering state IDLE
EAPOL authentication completed successfully
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mlan0' added
RX EAPOL from 00:1b:2f:55:79:7e
RX EAPOL - hexdump(len=176): 01 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 04 f0 49 17 07 66 ec 42 a1 ee e7 5c 84 3c e4 54 1a 15 fd 85 a7 f8 56 3d b1 ba 4a 66 5a ce 5e fa 2f 99 87 80 17 22 0e 5f 1a 72 ef 82 b4 f5 c0 6f 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9e 88 7b a0 10 51 aa 81 e6 2d c8 cd fc 40 3f 6e 00 20 4b fc 38 3b ac d9 05 47 05 c8 6b 3d 4f 41 50 0f 5f 75 9f 49 20 1a 39 77 45 d9 d0 9b bd d5 94 cb a4 35 cd c7 0b 4c 42 13 17 67 7e e2 07 9c 65 41 04 cf 6d 0e 5b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
IEEE 802.1X RX: version=1 type=3 length=127
  EAPOL-Key type=254
  key_info 0x391 (ver=1 keyidx=1 rsvd=0 Group Ack MIC Secure)
  key_length=32 key_data_length=32
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 04
  key_nonce - hexdump(len=32): f0 49 17 07 66 ec 42 a1 ee e7 5c 84 3c e4 54 1a 15 fd 85 a7 f8 56 3d b1 ba 4a 66 5a ce 5e fa 2f
  key_iv - hexdump(len=16): 99 87 80 17 22 0e 5f 1a 72 ef 82 b4 f5 c0 6f 49
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 9e 88 7b a0 10 51 aa 81 e6 2d c8 cd fc 40 3f 6e
WPA: RX EAPOL-Key - hexdump(len=176): 01 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 04 f0 49 17 07 66 ec 42 a1 ee e7 5c 84 3c e4 54 1a 15 fd 85 a7 f8 56 3d b1 ba 4a 66 5a ce 5e fa 2f 99 87 80 17 22 0e 5f 1a 72 ef 82 b4 f5 c0 6f 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9e 88 7b a0 10 51 aa 81 e6 2d c8 cd fc 40 3f 6e 00 20 4b fc 38 3b ac d9 05 47 05 c8 6b 3d 4f 41 50 0f 5f 75 9f 49 20 1a 39 77 45 d9 d0 9b bd d5 94 cb a4 35 cd c7 0b 4c 42 13 17 67 7e e2 07 9c 65 41 04 cf 6d 0e 5b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: ignoring 45 bytes after the IEEE 802.1X data
WPA: RX message 1 of Group Key Handshake from 00:1b:2f:55:79:7e (ver=1)
State: COMPLETED -> GROUP_HANDSHAKE
WPA: Group Key - hexdump(len=32): [REMOVED]
WPA: Installing GTK to the driver (keyidx=1 tx=0 len=32).
WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_driver_nl80211_set_key: ifindex=12 alg=2 addr=0x8091977 key_idx=1 set_tx=0 seq_len=6 key_len=32
WPA: Sending EAPOL-Key 2/2
WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 03 11 00 20 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 60 25 05 11 e1 93 46 59 44 db 78 ad 2d 4e 99 00 00
WPA: Group rekeying completed with 00:1b:2f:55:79:7e [GTK=TKIP]
Cancelling authentication timeout
State: GROUP_HANDSHAKE -> COMPLETED
EAPOL: startWhen --> 0
EAPOL: disable timer tick




^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
  2011-04-05 18:45     ` Bing Zhao
@ 2011-04-05 18:53       ` Johannes Berg
  2011-04-05 23:22         ` Bing Zhao
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2011-04-05 18:53 UTC (permalink / raw)
  To: Bing Zhao
  Cc: linux-wireless@vger.kernel.org, John W. Linville,
	Amitkumar Karwar, Kiran Divekar, Yogesh Powar, Marc Yang,
	Frank Huang, Jouni Malinen

Hi,

> > Ok Jouni and I just discussed this briefly, and it looks like there is
> > indeed a special case where the GTK is also set as the default TX key:
> > this case is when the station requested "no pairwise" or when the AP did
> > the same thing in the configuration.
> 
> From the wpa_supplicant debug log generated by Amit, it seems that
> set_default_key() is called while installing PTK to the driver. Is it
> expected?
> 
> WPA: Installing PTK to the driver.
> WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
> wpa_driver_nl80211_set_key: ifindex=12 alg=2 addr=0x80a7168 key_idx=0 set_tx=1 seq_len=6 key_len=32
>    addr=00:1b:2f:55:79:7e
> 
> The complete log file is attached for your reference.

Hmm. I'll need to look at that in more detail. But yeah, set_tx=1
indicates that it'll call set_default_key.

> > Is it possible that this just happens to be the case in your tests? It
> > looks like that would be rather strange, but that's a corner case where
> > the supplicant would possibly set the GTK as the default key.
> 
> Not the same corner case. In our test both pairwise and groupwise are configured.
> 
> > 
> > In any case, this patch seems wrong in that you should never return
> > success if the operation actually failed.
> 
> Could you please advise how we should resolve this?

What happens if you just reject the set_default_key and return -EINVAL
instead of 0?

johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
  2011-04-05 18:53       ` Johannes Berg
@ 2011-04-05 23:22         ` Bing Zhao
  2011-04-06  7:08           ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Bing Zhao @ 2011-04-05 23:22 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-wireless@vger.kernel.org, John W. Linville,
	Amitkumar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MyIGJzc2lkPTAwOjUwOjQzOjIxOjA3OmY4KQ0Kd3BhX2RyaXZlcl9ubDgwMjExX2Rpc2Nv
bm5lY3QNCg0KDQpUaGFua3MsDQoNCkJpbmcNCg0K

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
  2011-04-05 23:22         ` Bing Zhao
@ 2011-04-06  7:08           ` Johannes Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2011-04-06  7:08 UTC (permalink / raw)
  To: Bing Zhao
  Cc: linux-wireless@vger.kernel.org, John W. Linville,
	Amitkumar Karwar, Kiran Divekar, Yogesh Powar, Marc Yang,
	Frank Huang, Jouni Malinen

On Tue, 2011-04-05 at 16:22 -0700, Bing Zhao wrote:

> > > WPA: Installing PTK to the driver.
> > > WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
> > > wpa_driver_nl80211_set_key: ifindex=12 alg=2 addr=0x80a7168 key_idx=0 set_tx=1 seq_len=6 key_len=32
> > >    addr=00:1b:2f:55:79:7e

> > What happens if you just reject the set_default_key and return -EINVAL
> > instead of 0?
> 
> wpa_supplicant disconnects if we return -EINVAL in set_default_key handler.
> 
> WPA: Installing PTK to the driver.
> WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
> wpa_driver_nl80211_set_key: ifindex=3 alg=2 addr=0x9f6eef8 key_idx=0 set_tx=1 seq_len=6 key_len=32
>    addr=00:50:43:21:07:f8
> nl80211: set_key default failed; err=-22 Invalid argument)
> WPA: Failed to set PTK to the driver (alg=2 keylen=32 bssid=00:50:43:21:07:f8)
> wpa_driver_nl80211_disconnect

Ok. In the meantime, Jouni kinda convinced me that returning 0 is fine
since we only ever TX to the AP, and that key will already be used for
that, so let's go with the patch for now -- I'd still like to figure out
why wpa_s is even requesting this, but that doesn't need to be on you.

johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-06  7:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-02  1:36 [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2 Bing Zhao
2011-04-02  1:36 ` [PATCH 2/2] mwifiex: remove redundant encryption_mode mapping Bing Zhao
2011-04-03  8:02 ` [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2 Johannes Berg
2011-04-03  8:37   ` Johannes Berg
2011-04-05 18:45     ` Bing Zhao
2011-04-05 18:53       ` Johannes Berg
2011-04-05 23:22         ` Bing Zhao
2011-04-06  7:08           ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).