Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3527058imu; Mon, 7 Jan 2019 05:07:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/VnKXveAW3tmmAur/pa6e2/vcfIInCtVf96hC/jtzX4m/emzVk9keLnEAmUgDNT3lOhkFn+ X-Received: by 2002:a62:d005:: with SMTP id p5mr63065130pfg.175.1546866435603; Mon, 07 Jan 2019 05:07:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546866435; cv=none; d=google.com; s=arc-20160816; b=vZhEBaEn+GpCy21bv4u0dg0v8R0hg6ug6QTfRCdfTn7H3B39idXJynMAvC0CdbcYgy bO8ULODhemxbsLWrMm+qmDuNkPzr0ea4jV3VZabKJiFVWMhWKkhkHQjwMtceKEYGrtZs PWLHe+xQRFPagedGVGev5r2LmHmYSg6lHL4VCKbuvNHkwAJBK99Sv2qiZq+DMyqBlDpU JZCxVf0PXUSEoFpQ+cajGLxn51EzzNW729MEq02L21uIG2sFXiCZMCn3jPWGVGdZclwg jEVQhVZSZp0IbbbPf58Mh5YtI6nEaKRYzVPdUCRSWwUMqhJ0CHx9ZGlP8jd7pAGD8QKo JrYA== 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=gK9NPph6ooSjzcOsmcnKBreiTSDA8872T9uf+FEDjUA=; b=FtQsaENA8A4cHUQ5RKDZbpSyUqAAEDjb/WVOr/8mFhAr04VG8yLdOQUTjKSvjWh+m9 FgN3bTAwWFAMl+mdu2sNgOdmVRhNfZvPtzSpdFn5CmxYKI86EdzeM4Vm8SjPmUIM4LTI rIque+GxsaNLboIx2Y/ELNJ9ygqIEa+NCx2YhCT173iwRrWU9gHCevNnfvROCYdfI/h0 aL/9mA/sHl1IJiF8qmlRQQ1KPVfqFGrjVG8zBfE6w+qzGfoKvzSBG9OYzkbxAtHNyL5e +dMj0v1s1V1DtDpp2QkfYKfvKCd/IDln/sSqI/I2TWw+n77OzNWzfPvJSe+tyEHORfu9 EtZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q9sHzFUS; 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 k12si6387750pgg.382.2019.01.07.05.07.00; Mon, 07 Jan 2019 05:07:15 -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; dkim=pass header.i=@kernel.org header.s=default header.b=q9sHzFUS; 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 S1731076AbfAGNDr (ORCPT + 99 others); Mon, 7 Jan 2019 08:03:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:51214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731072AbfAGNDo (ORCPT ); Mon, 7 Jan 2019 08:03:44 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 009392089F; Mon, 7 Jan 2019 13:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546866223; bh=aMbJlwyMVJPIJ7LGyCV4RxBP9WmMGkjhUNg3wSTW794=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q9sHzFUSbGcMYNm4yFUt9RBl3Pb42p1upTKkstFZM2Kfi+7W9FEeHSqd8fDBcqZ5w Pnthl+XGXNyRVZQ3AnvgCGmXuq/mtqC5kTitkFEFmOTPxMDhz6p+DEntTCSWjF6Azx Bt82W2of6LniBToTqKXDVd+wGjmjZBezeLt9JXMs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Westphal , Pablo Neira Ayuso , Mauricio Faria de Oliveira , Sasha Levin Subject: [PATCH 4.14 080/101] netfilter: xt_connlimit: dont store address in the conn nodes Date: Mon, 7 Jan 2019 13:33:08 +0100 Message-Id: <20190107105337.326965501@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190107105330.372621917@linuxfoundation.org> References: <20190107105330.372621917@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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.14-stable review patch. If anyone has any objections, please let me know. ------------------ commit ce49480dba8666cba0106e8e31a942c9ce4c438a upstream. Only stored, never read. This is a leftover from commit 7d08487777c8 ("netfilter: connlimit: use rbtree for per-host conntrack obj storage"), which added the rbtree node struct that stores the address instead. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso [mfo: backport: refresh context lines and use older symbol/file names: - nf_conncount.c -> xt_connlimit.c. - nf_conncount_rb -> xt_connlimit_rb - nf_conncount_tuple -> xt_connlimit_conn - additionally, remove the add_hlist() 'addr' parameter that isn't used and removed later upstream with commit 625c556118f3 ("netfilter: connlimit: split xt_connlimit into front and backend") in the rename from 'xt_connlimit.c' to 'nf_conncount.c', a big refactor, so do it here, while still here in this related patch.] Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Sasha Levin --- net/netfilter/xt_connlimit.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index ffa8eec980e9..79d41515dd2c 100644 --- a/net/netfilter/xt_connlimit.c +++ b/net/netfilter/xt_connlimit.c @@ -46,7 +46,6 @@ struct xt_connlimit_conn { struct hlist_node node; struct nf_conntrack_tuple tuple; - union nf_inet_addr addr; }; struct xt_connlimit_rb { @@ -116,8 +115,7 @@ same_source_net(const union nf_inet_addr *addr, } static bool add_hlist(struct hlist_head *head, - const struct nf_conntrack_tuple *tuple, - const union nf_inet_addr *addr) + const struct nf_conntrack_tuple *tuple) { struct xt_connlimit_conn *conn; @@ -125,7 +123,6 @@ static bool add_hlist(struct hlist_head *head, if (conn == NULL) return false; conn->tuple = *tuple; - conn->addr = *addr; hlist_add_head(&conn->node, head); return true; } @@ -231,7 +228,7 @@ count_tree(struct net *net, struct rb_root *root, if (!addit) return count; - if (!add_hlist(&rbconn->hhead, tuple, addr)) + if (!add_hlist(&rbconn->hhead, tuple)) return 0; /* hotdrop */ return count + 1; @@ -270,7 +267,6 @@ count_tree(struct net *net, struct rb_root *root, } conn->tuple = *tuple; - conn->addr = *addr; rbconn->addr = *addr; INIT_HLIST_HEAD(&rbconn->hhead); -- 2.19.1