linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Cardona <javier@cozybit.com>
To: linux-wireless@vger.kernel.org
Cc: David Woo <xinhua_wu@realsil.com.cn>,
	Javier Cardona <javier@cozybit.com>,
	andrey@cozybit.com, johannes@sipsolutions.net,
	linville@tuxdriver.com, devel@lists.open80211s.org
Subject: [PATCH 2/2] mac80211: Fix invalid length passed to IE parser for PLINK CONFIRM frames
Date: Wed, 12 Aug 2009 11:03:44 -0700	[thread overview]
Message-ID: <1250100224-23832-3-git-send-email-javier@cozybit.com> (raw)
In-Reply-To: <1250100224-23832-2-git-send-email-javier@cozybit.com>

From: David Woo <xinhua_wu@realsil.com.cn>

The length of the fixed portion of plink confirm frames is 4 bytes longer than
the other plink_action frames.  This path corrects an error in the length
adjustment done for these type of frames.

Signed-off-by: Javier Cardona <javier@cozybit.com>
---
 net/mac80211/mesh_plink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 7c49c95..3575fe3 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -415,7 +415,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
 	baselen = (u8 *) mgmt->u.action.u.plink_action.variable - (u8 *) mgmt;
 	if (mgmt->u.action.u.plink_action.action_code == PLINK_CONFIRM) {
 		baseaddr += 4;
-		baselen -= 4;
+		baselen += 4;
 	}
 	ieee802_11_parse_elems(baseaddr, len - baselen, &elems);
 	if (!elems.peer_link) {
-- 
1.5.4.3


      reply	other threads:[~2009-08-12 18:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 10:22 diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c David Woo
2009-08-11 10:50 ` Johannes Berg
2009-08-11 11:47   ` david woo
2009-08-11 18:47     ` John W. Linville
2009-08-12  0:33       ` 吴新华
2009-08-12  1:42     ` Javier Cardona
2009-08-12  6:39       ` david woo
2009-08-12 18:03         ` Fix preq frame process and peer link frame baselen Javier Cardona
2009-08-12 18:03           ` [PATCH 1/2] mac80211: Mark a destination sequence number as valid when a PREQ is received Javier Cardona
2009-08-12 18:03             ` Javier Cardona [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1250100224-23832-3-git-send-email-javier@cozybit.com \
    --to=javier@cozybit.com \
    --cc=andrey@cozybit.com \
    --cc=devel@lists.open80211s.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=xinhua_wu@realsil.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).