Skip to contentSkip to conversation

mac80211: do not check duplicate IEs when parsing elements.

PATCH In review Fred Zhou 2 participants 2 messages Sep 9, 2013 mac80211

lore
Share & tools
lore

Fred Zhou

author
#0 lore raw

PATCH 1/1 mac80211: do not check duplicate IEs when parsing elements.

The 802.11 standard does not prevent the same IE to be included in one frame (e.g. beacon) multiple times. When the same ID is seen more than once, it should not be declared to be parse error. Remove the checking for duplicate IE.

---
 net/mac80211/util.c |   43 -------------------------------------------
 1 file changed, 43 deletions(-)
net/mac80211/util.c +0 -43
index e1b34a1..49c92af 100644
@@ -716,49 +716,6 @@ u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
 			break;
 		}
 
-		switch (id) {
-		case WLAN_EID_SSID:
-		case WLAN_EID_SUPP_RATES:
-		case WLAN_EID_FH_PARAMS:
-		case WLAN_EID_DS_PARAMS:
-		case WLAN_EID_CF_PARAMS:
-		case WLAN_EID_TIM:
-		case WLAN_EID_IBSS_PARAMS:
-		case WLAN_EID_CHALLENGE:
-		case WLAN_EID_RSN:
-		case WLAN_EID_ERP_INFO:
-		case WLAN_EID_EXT_SUPP_RATES:
-		case WLAN_EID_HT_CAPABILITY:
-		case WLAN_EID_HT_OPERATION:
-		case WLAN_EID_VHT_CAPABILITY:
-		case WLAN_EID_VHT_OPERATION:
-		case WLAN_EID_MESH_ID:
-		case WLAN_EID_MESH_CONFIG:
-		case WLAN_EID_PEER_MGMT:
-		case WLAN_EID_PREQ:
-		case WLAN_EID_PREP:
-		case WLAN_EID_PERR:
-		case WLAN_EID_RANN:
-		case WLAN_EID_CHANNEL_SWITCH:
-		case WLAN_EID_EXT_CHANSWITCH_ANN:
-		case WLAN_EID_COUNTRY:
-		case WLAN_EID_PWR_CONSTRAINT:
-		case WLAN_EID_TIMEOUT_INTERVAL:
-		case WLAN_EID_SECONDARY_CHANNEL_OFFSET:
-		case WLAN_EID_WIDE_BW_CHANNEL_SWITCH:
-		/*
-		 * not listing WLAN_EID_CHANNEL_SWITCH_WRAPPER -- it seems possible
-		 * that if the content gets bigger it might be needed more than once
-		 */
-			if (test_bit(id, seen_elems)) {
-				elems->parse_error = true;
-				left -= elen;
-				pos += elen;
-				continue;
-			}
-			break;
-		}
-
 		if (calc_crc && id < 64 && (filter & (1ULL << id)))
 			crc = crc32_be(crc, pos - 2, elen + 2);
 
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 2 lines · Fred Zhou

The 802.11 standard does not prevent the same IE to be included in one frame (e.g. beacon) multiple times.

Actually, it does say that the IEs must be in a given order, with exactly the IEs (except for the ones that are allowed multiple times etc.)

johannes