فهرست منبع

qcacld-3.0: Support more Cipher / Akm suits in RSNIE parsing

Currently, while parinsg RSNIE host allow up to 4 max
cipher / akm suits. Hence if beacon / probe response
carry more than 4 cipher/akm suits then RSNIE parsing
get fails.
As a part of fix, increase cipher/akm max count to 6.

Change-Id: I62f8797b480f0cc82586f76ec7fd318499bc7628
CRs-Fixed: 2081030
Mukul Sharma 7 سال پیش
والد
کامیت
9f1345284e
3فایلهای تغییر یافته به همراه15 افزوده شده و 15 حذف شده
  1. 2 2
      core/mac/src/cfg/cfgUtil/dot11f.frms
  2. 4 4
      core/mac/src/include/dot11f.h
  3. 9 9
      core/mac/src/sys/legacy/src/utils/src/dot11f.c

+ 2 - 2
core/mac/src/cfg/cfgUtil/dot11f.frms

@@ -1424,12 +1424,12 @@ IE RSN (EID_RSN)                          // 7.3.2.25
     // I don't see anything in the Standard limiting the number of Pairwise
     // Cypher Suites, other than the maximum length of an IE, which limits us
     // to 61.  However, that seems needlessly wasteful of space.
-    pwise_cipher_suites[4][0..4] COUNTIS pwise_cipher_suite_count;
+    pwise_cipher_suites[4][0..6] COUNTIS pwise_cipher_suite_count;
     // Optional count of AKM suite selectors
     OPTIONAL akm_suite_count, 2;
     // Again, I see nothing in the Standard explicitly limiting the number of
     // AKM suite selectors other than the maximum size of an IE.
-    akm_suites[4][0..4] COUNTIS akm_suite_count;
+    akm_suites[4][0..6] COUNTIS akm_suite_count;
     OPTIONAL RSN_Cap[2];
     // Finally, the IE may contain zero or more PMKIDs:
     OPTIONAL pmkid_count, 2;

+ 4 - 4
core/mac/src/include/dot11f.h

@@ -35,7 +35,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Tue Sep 26 17:32:45 2017 from the following file(s):
+ * Thu Oct  5 16:54:18 2017 from the following file(s):
  *
  * dot11f.frms
  *
@@ -6717,9 +6717,9 @@ typedef struct sDot11fIERSN {
 	uint16_t            version /* Must be 1! */;
 	uint8_t             gp_cipher_suite[4];
 	uint16_t            pwise_cipher_suite_count;
-	uint8_t             pwise_cipher_suites[4][4];
+	uint8_t             pwise_cipher_suites[6][4];
 	uint16_t            akm_suite_count;
-	uint8_t             akm_suites[4][4];
+	uint8_t             akm_suites[6][4];
 	uint8_t             RSN_Cap[2];
 	uint16_t            pmkid_count;
 	uint8_t             pmkid[4][16];
@@ -6731,7 +6731,7 @@ typedef struct sDot11fIERSN {
 /* N.B. These #defines do *not* include the EID & length */
 #define DOT11F_IE_RSN_MIN_LEN (6)
 
-#define DOT11F_IE_RSN_MAX_LEN (114)
+#define DOT11F_IE_RSN_MAX_LEN (130)
 
 #ifdef __cplusplus
 extern "C" {

+ 9 - 9
core/mac/src/sys/legacy/src/utils/src/dot11f.c

@@ -33,7 +33,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Tue Sep 26 17:32:45 2017 from the following file(s):
+ * Thu Oct  5 16:54:18 2017 from the following file(s):
  *
  * dot11f.frms
  *
@@ -4948,7 +4948,7 @@ uint32_t dot11f_unpack_ie_rsn(tpAniSirGlobal pCtx,
 		pBuf += 2;
 		ielen -= (uint8_t)2;
 	}
-	if (pDst->pwise_cipher_suite_count > 4) {
+	if (pDst->pwise_cipher_suite_count > 6) {
 		pDst->present = 0;
 		return DOT11F_SKIPPED_BAD_IE;
 	}
@@ -4965,7 +4965,7 @@ uint32_t dot11f_unpack_ie_rsn(tpAniSirGlobal pCtx,
 		pBuf += 2;
 		ielen -= (uint8_t)2;
 	}
-	if (pDst->akm_suite_count > 4) {
+	if (pDst->akm_suite_count > 6) {
 		pDst->present = 0;
 		return DOT11F_SKIPPED_BAD_IE;
 	}
@@ -7548,7 +7548,7 @@ static const tIEDefn IES_Beacon[] = {
 	present), 0, "ExtSuppRates", 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_EXTSUPPRATES, 0, 0, },
 	{ offsetof(tDot11fBeacon, RSN), offsetof(tDot11fIERSN, present), 0, "RSN",
-	0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
+	0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
 	{ offsetof(tDot11fBeacon, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present),
 	0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_QBSSLOAD, 0, 0, },
@@ -7997,7 +7997,7 @@ static const tIEDefn IES_BeaconIEs[] = {
 	0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_EXTSUPPRATES, 0, 0, },
 	{ offsetof(tDot11fBeaconIEs, RSN), offsetof(tDot11fIERSN, present), 0,
-	"RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
+	"RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
 	{ offsetof(tDot11fBeaconIEs, QBSSLoad), offsetof(tDot11fIEQBSSLoad,
 	present), 0, "QBSSLoad", 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_QBSSLOAD, 0, 0, },
@@ -9356,7 +9356,7 @@ static const tIEDefn IES_TDLSDisRsp[] = {
 	"SuppOperatingClasses", 0, 3, 34, SigIeSuppOperatingClasses,
 	{0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, 0, },
 	{ offsetof(tDot11fTDLSDisRsp, RSN), offsetof(tDot11fIERSN, present), 0,
-	"RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
+	"RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
 	{ offsetof(tDot11fTDLSDisRsp, ExtCap), offsetof(tDot11fIEExtCap, present),
 	0, "ExtCap", 0, 3, 17, SigIeExtCap, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_EXTCAP, 0, 0, },
@@ -9487,7 +9487,7 @@ static const tFFDefn FFS_TDLSSetupCnf[] = {
 
 static const tIEDefn IES_TDLSSetupCnf[] = {
 	{ offsetof(tDot11fTDLSSetupCnf, RSN), offsetof(tDot11fIERSN, present), 0,
-	"RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
+	"RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
 	{ offsetof(tDot11fTDLSSetupCnf, EDCAParamSet),
 	offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet",
 	0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0},
@@ -9562,7 +9562,7 @@ static const tIEDefn IES_TDLSSetupReq[] = {
 	0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_SUPPCHANNELS, 0, 0, },
 	{ offsetof(tDot11fTDLSSetupReq, RSN), offsetof(tDot11fIERSN, present), 0,
-	"RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
+	"RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
 	{ offsetof(tDot11fTDLSSetupReq, ExtCap), offsetof(tDot11fIEExtCap,
 	present), 0, "ExtCap", 0, 3, 17, SigIeExtCap, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_EXTCAP, 0, 0, },
@@ -9651,7 +9651,7 @@ static const tIEDefn IES_TDLSSetupRsp[] = {
 	0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_SUPPCHANNELS, 0, 0, },
 	{ offsetof(tDot11fTDLSSetupRsp, RSN), offsetof(tDot11fIERSN, present), 0,
-	"RSN", 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
+	"RSN", 0, 8, 132, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, },
 	{ offsetof(tDot11fTDLSSetupRsp, ExtCap), offsetof(tDot11fIEExtCap,
 	present), 0, "ExtCap", 0, 3, 17, SigIeExtCap, {0, 0, 0, 0, 0},
 	0, DOT11F_EID_EXTCAP, 0, 0, },