diff mbox

[01/17] mac80211: fix off-by-one in llid check.

Message ID 1383679025-7150-1-git-send-email-thomas@cozybit.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Thomas Pedersen Nov. 5, 2013, 7:16 p.m. UTC
From: Bob Copeland <me@bobcopeland.com>

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>
---
 net/mac80211/mesh_plink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Berg Nov. 6, 2013, 10:35 a.m. UTC | #1
Very nice. I've squashed the llid assignment into the patch that
introduced the warning.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thomas Pedersen Nov. 6, 2013, 3:14 p.m. UTC | #2
On Wed, Nov 6, 2013 at 2:35 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> Very nice. I've squashed the llid assignment into the patch that
> introduced the warning.

Hm, ok. Guess you can't get them all :)

Thanks!
diff mbox

Patch

diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 4301aa5..a8c75c1 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -825,7 +825,7 @@  void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata,
 				event = CLS_ACPT;
 			else if (sta->plid != plid)
 				event = CLS_IGNR;
-			else if (ie_len == 7 && sta->llid != llid)
+			else if (ie_len == 8 && sta->llid != llid)
 				event = CLS_IGNR;
 			else
 				event = CLS_ACPT;