Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3926086imm; Mon, 8 Oct 2018 11:48:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV61V5mpKdOVuFaZJ9yp5eIybvJbWt8S9YMqQo3YfYiu/tgV1trP1J88XiDOHeWadBxG/QZVB X-Received: by 2002:a63:5b57:: with SMTP id l23-v6mr6181955pgm.50.1539024493366; Mon, 08 Oct 2018 11:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024493; cv=none; d=google.com; s=arc-20160816; b=ldC/5u4qfFSv2z21pJopYtDDHFnywe/EzYN+73LPCKWckRjoxwGJfUYZasj3RTTqmH T7UqYipGgJWpZ2LXtEdwCLGPS7pPhHJV2tZagR8q0AWVW51VF8az6flds/zByBCCVbJZ xQiTzJf5fILxtCtL9U9yHxlA7GDqK7eAnr2QUjO42PLaSgVRB1DqxyetVnIck+bFXJmT zB7+anYM1oxUYIUf420zsw4cj0OGE++X2je9PzRujto0+1S1/xviaknE6DjzLG/9dhjk adUIDUaRlb0fUlBJHcVviXeA6kiZgZM1/2PGxRuW2vLbtNsMuAes86E24vCzdcCpr/IL xoQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BwTfxlCUCWv4PeXwcjoNdY2JHICKGCJfi1pgV/Yanuo=; b=swtk30R/qUmh+JQEakjOxiWYAakzS8eEh9I2gGrcHipCrLJNf6AVzND0LrcelrMEW7 jmlZh0p0vrpsplMDzohrEdvvBuQMufyccknosyGp3ZUiYbWXOhF4Nw7RY1rJOx0V2aIc vS3GnNs4c8YBp5cbTR5BPS10RXBV8FmKzvhs7A10tIlvLyALcKGupySFvFxXCdS0kIo/ Ppm+xfGZt1PYgyKa7Ub+jyWPxtrfQNQaDVZAhMZcFFFjfMEdRtwwd52uXbxiedeKwldy 9JoU0FveUELPWqL0BaQzZIn7nSPUYgGl74OSDR9gB6CsKh+eFVorKW+LfC90/B2WLvsk P0nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=naB52fk6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23-v6si3982188pgh.250.2018.10.08.11.47.58; Mon, 08 Oct 2018 11:48:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=naB52fk6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731210AbeJIB7a (ORCPT + 99 others); Mon, 8 Oct 2018 21:59:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:47744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728570AbeJIB73 (ORCPT ); Mon, 8 Oct 2018 21:59:29 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 851342064A; Mon, 8 Oct 2018 18:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024384; bh=6ouU/WOVsDm0k9pFoDi99JtY1Xm1PjRD5R3BBkeRKII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=naB52fk6+CHD++UC2tGxDRHW6qQmu2O+r/jmLMQGAvHBljpnULOVml+49UTRjsbnP o2fR3VnECAQd4KX8R40o/VjlEsQuklYYgFi707ODqPJxTTi6avqP1Q2iGVZzHLxpBo PJaMennB4e/Hcm4eEJwifxQz3dd4GmAHF5U8NkUs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yuan-Chi Pang , Johannes Berg , Sasha Levin Subject: [PATCH 4.18 023/168] mac80211: mesh: fix HWMP sequence numbering to follow standard Date: Mon, 8 Oct 2018 20:30:03 +0200 Message-Id: <20181008175620.923070677@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yuan-Chi Pang [ Upstream commit 1f631c3201fe5491808df143d8fcba81b3197ffd ] IEEE 802.11-2016 14.10.8.3 HWMP sequence numbering says: If it is a target mesh STA, it shall update its own HWMP SN to maximum (current HWMP SN, target HWMP SN in the PREQ element) + 1 immediately before it generates a PREP element in response to a PREQ element. Signed-off-by: Yuan-Chi Pang Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/mac80211/mesh_hwmp.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -572,6 +572,10 @@ static void hwmp_preq_frame_process(stru forward = false; reply = true; target_metric = 0; + + if (SN_GT(target_sn, ifmsh->sn)) + ifmsh->sn = target_sn; + if (time_after(jiffies, ifmsh->last_sn_update + net_traversal_jiffies(sdata)) || time_before(jiffies, ifmsh->last_sn_update)) {