瀏覽代碼

mac80211: fix off-by-one in llid check.

According to IEEE 802.11-2012 (8.4.2.104), no peering
management element exists with length 7. This code is checking
to see if llid is present to ignore close frames with different
llid, which would be IEs with length 8.

Signed-off-by: Bob Copeland <bob@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bob Copeland 12 年之前
父節點
當前提交
3cde38e7f3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/mac80211/mesh_plink.c

+ 1 - 1
net/mac80211/mesh_plink.c

@@ -825,7 +825,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata,
 				event = CLS_ACPT;
 				event = CLS_ACPT;
 			else if (sta->plid != plid)
 			else if (sta->plid != plid)
 				event = CLS_IGNR;
 				event = CLS_IGNR;
-			else if (ie_len == 7 && sta->llid != llid)
+			else if (ie_len == 8 && sta->llid != llid)
 				event = CLS_IGNR;
 				event = CLS_IGNR;
 			else
 			else
 				event = CLS_ACPT;
 				event = CLS_ACPT;