Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3316373imu; Sun, 11 Nov 2018 12:12:58 -0800 (PST) X-Google-Smtp-Source: AJdET5fBX4PrZzFtyl8cz2Lr2nAVMiXvkRLYehyXwfPluFXI8p20Se4qztzHP8QBr9568XyjW+tN X-Received: by 2002:a63:4566:: with SMTP id u38mr14932667pgk.4.1541967178261; Sun, 11 Nov 2018 12:12:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541967178; cv=none; d=google.com; s=arc-20160816; b=MaL7c3bO35YlSvajyX/BCDk0zsa4ps/SATF20TdMJMtLtIYGwHdh0el39SUR9SE/OE 6y5gvpZgxXw+pgmz1JGkNcqnsddb35jqr4SDeE9PNhzn0grCb8AnNHvFyLNiyI6ILTX5 rTtaiGuMe14BdEInZnGF7/AftoPsf3R6j1fUQxEKsPeOuWUZna9yJSI9vDglibAUPlF8 itp4HaG8QWLzIcIX2Qz4q8Ujpqis67t9z9UwL6F2sjxGiTsHIhp3137cVMoSV/cC+jFI XfTFFqgOnajeeJYG8BXAkn2vEBMcrXhS2dTltggogrq1Y3fZPZYNZdqfuADlFMRRvx+0 InEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=ueXDFdMAbprdjZmm1KBrzCFH6YnlcyMzUKYeKvTkWEE=; b=nwxQWtzbqsjVAqnYpDqlXY3wnojJB2BQMqBk9YRgw8OLehcW1WEHIBhB9Tg5bpCISY WAJ3eCzbir418y+qgH8Zn5eCsSz94MLOCPrU6oqjDJ4Bc76FCXywqzzzmsoI2oF68XTa lLrY3AsSU21BzgdSUe3D/45R8iTQYApb7+xESeOk/Y0IuzDVVqc4aq30RzWIHaujc1KI G0iYfC9eM24dFvXVKzaPBlD+jA+Nnaw9S2UPtUtQlNts/9PhWhfgX+F/HYa5QJrsqh4o Cru+eYFtJUpMLerjCZzNl5cPsYLMKJg3RXY/v6INYn6TRnaDkOgvaoIrC4JLKhcaLmK4 Ek/g== ARC-Authentication-Results: i=1; mx.google.com; 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 u21si13862123pgg.463.2018.11.11.12.12.43; Sun, 11 Nov 2018 12:12:58 -0800 (PST) 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; 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 S1731567AbeKLGAL (ORCPT + 99 others); Mon, 12 Nov 2018 01:00:11 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:52386 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727357AbeKLGAK (ORCPT ); Mon, 12 Nov 2018 01:00:10 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsy-0000l6-67; Sun, 11 Nov 2018 19:59:08 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsT-0001cp-VP; Sun, 11 Nov 2018 19:58:37 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Sven Eckelmann" , "=?UTF-8?q?Linus=20L=C3=BCssing?=" , "Simon Wunderlich" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 189/366] batman-adv: Avoid storing non-TT-sync flags on singular entries too In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Linus Lüssing commit 4a519b83da16927fb98fd32b0f598e639d1f1859 upstream. Since commit 54e22f265e87 ("batman-adv: fix TT sync flag inconsistencies") TT sync flags and TT non-sync'd flags are supposed to be stored separately. The previous patch missed to apply this separation on a TT entry with only a single TT orig entry. This is a minor fix because with only a single TT orig entry the DDoS issue the former patch solves does not apply. Fixes: 54e22f265e87 ("batman-adv: fix TT sync flag inconsistencies") Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Ben Hutchings --- net/batman-adv/translation-table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -1378,7 +1378,8 @@ static bool batadv_tt_global_add(struct ether_addr_copy(common->addr, tt_addr); common->vid = vid; - common->flags = flags; + common->flags = flags & (~BATADV_TT_SYNC_MASK); + tt_global_entry->roam_at = 0; /* node must store current time in case of roaming. This is * needed to purge this entry out on timeout (if nobody claims