From patchwork Mon Aug 8 23:30:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 1047252 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p78NVJFS011351 for ; Mon, 8 Aug 2011 23:31:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753330Ab1HHXbQ (ORCPT ); Mon, 8 Aug 2011 19:31:16 -0400 Received: from mail-iy0-f170.google.com ([209.85.210.170]:38857 "EHLO mail-iy0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753295Ab1HHXbP (ORCPT ); Mon, 8 Aug 2011 19:31:15 -0400 Received: by iye16 with SMTP id 16so9873546iye.1 for ; Mon, 08 Aug 2011 16:31:15 -0700 (PDT) Received: by 10.231.85.12 with SMTP id m12mr6384545ibl.60.1312846274983; Mon, 08 Aug 2011 16:31:14 -0700 (PDT) Received: from localhost.localdomain (99-8-184-170.lightspeed.snfcca.sbcglobal.net [99.8.184.170]) by mx.google.com with ESMTPS id v16sm4554432ibf.25.2011.08.08.16.31.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Aug 2011 16:31:13 -0700 (PDT) From: Javier Cardona To: "John W. Linville" Cc: Javier Cardona , Thomas Pedersen , devel@lists.open80211s.org, Johannes Berg , linux-wireless@vger.kernel.org, jlopex@gmail.com Subject: [PATCH] mac80211: fix erroneous clearing of MESH_PATH_SN_VALID flag Date: Mon, 8 Aug 2011 16:30:50 -0700 Message-Id: <1312846250-14612-1-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.7.6 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 08 Aug 2011 23:31:19 +0000 (UTC) When a PREQ or PREP is received from an intermediate node, it contains useful information for path selection but it doesn't include the originator's sequence number. Therefore, when updating the mesh path to that intermediate node, we should not set the MESH_PATH_SN_VALID flag. BUT, if the flag is set, it should not be unset as we might have received a valid sequence number for that intermediate node in the past. This issue was reported, fixed and tested by Ya Bo (??) and Pedro Larbig (ASPj). Signed-off-by: Javier Cardona --- net/mac80211/mesh_hwmp.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 8404fa5..3d8e55a 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -449,7 +449,6 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, if (fresh_info) { mesh_path_assign_nexthop(mpath, sta); - mpath->flags &= ~MESH_PATH_SN_VALID; mpath->metric = last_hop_metric; mpath->exp_time = time_after(mpath->exp_time, exp_time) ? mpath->exp_time : exp_time;