From 448573185e1cee6155c417f87b7504e195665a87 Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Tue, 19 Dec 2017 18:06:57 +0530 Subject: [PATCH] qcacld-3.0: Fix min IE length for FILS indication IE FILS indication IE minimum length should be 4 bytes (2 bytes for tag and length) + (2 bytes for realm hash). However current mininum is set to 5 bytes. Usually AP sends cache identifier also in the FILS indication IE, which is optional and causes the ie length to be greater than min of 5. If the AP does not send Cache Identifier and sends only realm hash, the IE length would be 4, which causes the IE to be skipped in parsing thereby failing FILS connection. Fix min IE length to 4 bytes in the frame parser for FILS Indication IE Change-Id: I07f2b724f5840f9ba8ec663e0b303d8fc86663da CRs-Fixed: 2161241 --- core/mac/src/cfg/cfgUtil/dot11f.frms | 2 +- core/mac/src/include/dot11f.h | 4 ++-- core/mac/src/sys/legacy/src/utils/src/dot11f.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms index 5e9dc5e19ab4..0b0fd017ac2b 100644 --- a/core/mac/src/cfg/cfgUtil/dot11f.frms +++ b/core/mac/src/cfg/cfgUtil/dot11f.frms @@ -2601,7 +2601,7 @@ IE fils_indication (EID_FILS_INDICATION) reserved : 4; } // other FILS elements - variable_data[3..255]; + variable_data[2..255]; } IE fils_assoc_delay_info (EID_EXTN_ID_ELEMENT) OUI ( 0x01 ) diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h index 4435778feb81..ef88902dbf1e 100644 --- a/core/mac/src/include/dot11f.h +++ b/core/mac/src/include/dot11f.h @@ -35,7 +35,7 @@ * * * This file was automatically generated by 'framesc' - * Tue Dec 19 17:48:07 2017 from the following file(s): + * Tue Dec 19 17:58:19 2017 from the following file(s): * * dot11f.frms * @@ -8404,7 +8404,7 @@ typedef struct sDot11fIEfils_indication { #define DOT11F_EID_FILS_INDICATION (240) /* N.B. These #defines do *not* include the EID & length */ -#define DOT11F_IE_FILS_INDICATION_MIN_LEN (5) +#define DOT11F_IE_FILS_INDICATION_MIN_LEN (4) #define DOT11F_IE_FILS_INDICATION_MAX_LEN (257) diff --git a/core/mac/src/sys/legacy/src/utils/src/dot11f.c b/core/mac/src/sys/legacy/src/utils/src/dot11f.c index 35a4906cb87c..0a264ed98712 100644 --- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c +++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c @@ -33,7 +33,7 @@ * * * This file was automatically generated by 'framesc' - * Tue Dec 19 17:48:07 2017 from the following file(s): + * Tue Dec 19 17:58:19 2017 from the following file(s): * * dot11f.frms * @@ -7714,7 +7714,7 @@ static const tIEDefn IES_Beacon[] = { 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, { offsetof(tDot11fBeacon, fils_indication), offsetof(tDot11fIEfils_indication, present), 0, "fils_indication", - 0, 7, 259, SigIefils_indication, {0, 0, 0, 0, 0}, + 0, 6, 259, SigIefils_indication, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FILS_INDICATION, 0, 0, }, { offsetof(tDot11fBeacon, Vendor1IE), offsetof(tDot11fIEVendor1IE, present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, @@ -7943,7 +7943,7 @@ static const tIEDefn IES_Beacon2[] = { 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, { offsetof(tDot11fBeacon2, fils_indication), offsetof(tDot11fIEfils_indication, present), 0, "fils_indication", - 0, 7, 259, SigIefils_indication, {0, 0, 0, 0, 0}, + 0, 6, 259, SigIefils_indication, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FILS_INDICATION, 0, 0, }, { offsetof(tDot11fBeacon2, Vendor1IE), offsetof(tDot11fIEVendor1IE, present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, @@ -8168,7 +8168,7 @@ static const tIEDefn IES_BeaconIEs[] = { 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, { offsetof(tDot11fBeaconIEs, fils_indication), offsetof(tDot11fIEfils_indication, present), 0, "fils_indication", - 0, 7, 259, SigIefils_indication, {0, 0, 0, 0, 0}, + 0, 6, 259, SigIefils_indication, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FILS_INDICATION, 0, 0, }, { offsetof(tDot11fBeaconIEs, Vendor1IE), offsetof(tDot11fIEVendor1IE, present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0}, @@ -8809,7 +8809,7 @@ static const tIEDefn IES_ProbeResponse[] = { 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, { offsetof(tDot11fProbeResponse, fils_indication), offsetof(tDot11fIEfils_indication, present), 0, "fils_indication", - 0, 7, 259, SigIefils_indication, {0, 0, 0, 0, 0}, + 0, 6, 259, SigIefils_indication, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FILS_INDICATION, 0, 0, }, { offsetof(tDot11fProbeResponse, Vendor1IE), offsetof(tDot11fIEVendor1IE, present), 0, "Vendor1IE", 0, 5, 5, SigIeVendor1IE, {0, 16, 24, 0, 0},