From patchwork Tue Nov 5 19:16:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 3143331 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EACA8BEEB2 for ; Tue, 5 Nov 2013 19:22:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B84DB205B3 for ; Tue, 5 Nov 2013 19:22:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CBF62058D for ; Tue, 5 Nov 2013 19:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752970Ab3KETWj (ORCPT ); Tue, 5 Nov 2013 14:22:39 -0500 Received: from mail-pd0-f176.google.com ([209.85.192.176]:34304 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925Ab3KETWj (ORCPT ); Tue, 5 Nov 2013 14:22:39 -0500 Received: by mail-pd0-f176.google.com with SMTP id g10so8995773pdj.35 for ; Tue, 05 Nov 2013 11:22:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BWVpQ1iFHOxR+QOcDGGtAGDrrpZjWwVT+by2tIzxdXs=; b=LfLsnFBmNX0AxoFmtgoHfJVvlWhXlr89QS9BsBxsf+zkGUV3+Hq1mWs/y/++C4Q/17 Vxaa2laI6zNCqsex43vlqp+QW8eQRC4Fel4e+HzTW8OgFatv9NUBuOcL5ZAAC4PLBAJ2 oIZ4ha+gdhjeSAW3Pc5rHJ5Magb5lXqaAjRcKhfTWh11aNoYEQzTRKvUGlPpr0pg2k6U ixw2FZoOSGpE3lEoEduCGdtjGMCqWslOo4EjfjkCNZOasT+6/yjQlVhiqqRMtqvFFZsa la21YWnIw+SoWen111s5VZMktxGnZXyvJMkdcCkuc0PIZRWvz+ONyiVgEe5mt5igezTo ztkg== X-Gm-Message-State: ALoCoQkFzQ9QD2mDVku6iElPmzIE9v7S4gTymXrELhbkigCNIjib8XX2epFUcFTSikrgY9Cc5jt9 X-Received: by 10.68.134.98 with SMTP id pj2mr24485150pbb.110.1383679358486; Tue, 05 Nov 2013 11:22:38 -0800 (PST) Received: from cable.cozybit (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPSA id de1sm36237294pbc.7.2013.11.05.11.22.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Nov 2013 11:22:37 -0800 (PST) From: Thomas Pedersen To: Johannes Berg Cc: Bob Copeland , linux-wireless , open80211s Subject: [PATCH 01/17] mac80211: fix off-by-one in llid check. Date: Tue, 5 Nov 2013 11:16:49 -0800 Message-Id: <1383679025-7150-1-git-send-email-thomas@cozybit.com> X-Mailer: git-send-email 1.8.4.rc3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Copeland 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 --- net/mac80211/mesh_plink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;