From patchwork Fri Sep 30 16:05:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101728 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp373196qgf; Fri, 30 Sep 2016 09:07:29 -0700 (PDT) X-Received: by 10.98.97.7 with SMTP id v7mr12877833pfb.140.1475251649813; Fri, 30 Sep 2016 09:07:29 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gm8si20616399pac.186.2016.09.30.09.07.29; Fri, 30 Sep 2016 09:07:29 -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; 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 S933940AbcI3QH1 (ORCPT + 27 others); Fri, 30 Sep 2016 12:07:27 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:60148 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933296AbcI3QHX (ORCPT ); Fri, 30 Sep 2016 12:07:23 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0LlWhL-1bFI4e2kr9-00bL28; Fri, 30 Sep 2016 18:07:03 +0200 From: Arnd Bergmann To: Pablo Neira Ayuso Cc: Arnd Bergmann , Patrick McHardy , Jozsef Kadlecsik , "David S. Miller" , Aaron Conole , Florian Westphal , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] netfilter: hide reference to nf_hooks_ingress Date: Fri, 30 Sep 2016 18:05:35 +0200 Message-Id: <20160930160559.4102745-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160930160559.4102745-1-arnd@arndb.de> References: <20160930160559.4102745-1-arnd@arndb.de> X-Provags-ID: V03:K0:Ees/Vnz4KTKvroWZ6eBrp6bINShBfh6I90417coshJ5wtbfnP7l zn9exTTZSd12B5YIyPGQGPendcil09M0GBLXXxvySmqMiX1xMzVcUbmvovAZ5yW6QxBHcqi ENmuzHHyep3V0DMUDgDX2NFbGHARzOhylCNC1qReh8nMP7+Bqubwn3K6Im+8i+4poF4ZInV Uzg12NgqxaYev0KcR8/SA== X-UI-Out-Filterresults: notjunk:1; V01:K0:RO+fnMb3wqw=:8ObCJf2MGzC8E+Rf9G3JkJ dKXv/INxGfPNfeLvlIco1Jiglq8NH/zMfAu4JZfHBSbregXLuNU5KPEWZqSyxnXKs4hFwkJRT sIgAmRKl/j6QG/WmYgAxlnZ+cyd+fG2SwhVr2QhWzmHGFBCMhHdahEmwVCVrQvXLMDoy0CCBR IvcS3IJWGhBr0WHPz0EZe7Ze1GyM1YnLMdPa+0agO/v46+axD7C0RnMY0LJPtMW1Gyf3YpbNg s9T9OMiOkmy6onWQcRVDX3gG9vNMtakkdt02Er1Ih7KA1HejwnBjolmDCYcfutqEbcr5usuuh JaoiR8ev6BgIVh0SBr2TSdo5vdZbi+Ww2plrBeBz+seyo1NxLnjB3OLzy0ZkydZJf9JDmUMlM 3gzxqNwLK0E6cC732ZHG/oxaKWeLgexuaiXh6zetwaElTMB7bIq51WqngQc6aDlb8k9RQ7YD3 RaRBvM6PWcqxUI+oUAEt7bDXvRex7ryS5SLn0BxNuchLZahaGE0Ls4LzmnB89VyZL0A1TsQ02 Gv6NpwX+fUmXdiQR5fYZx/9FdA0OrN5lLq04dFH+SDEQkzxKz8gIgnAMZMp1jlUOECPtEARLx 6g4FfXKEiooJhdDf1hihwkVQ//rU4g5nzjo4XDaHfbCGMdrLZTKWxbzc9sn3iad/iB4lem6Ik QsC8ZN8Uu9fswpfQMxIeY/Pa6qAefvfKeKYMHR2w3Edpd2FDxJxkf/3/cDYtBJUzOgiY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A recent cleanup added an unconditional reference to the nf_hooks_ingress pointer, but that fails when CONFIG_NETFILTER_INGRESS is disabled and that member is not present in net_device: net/netfilter/core.c: In function 'nf_set_hooks_head': net/netfilter/core.c:96:30: error: 'struct net_device' has no member named 'nf_hooks_ingress' This avoids the build error by simply enclosing the assignment in an #ifdef, which may or may not be the correct fix. Fixes: e3b37f11e6e4 ("netfilter: replace list_head with single linked list") Signed-off-by: Arnd Bergmann --- net/netfilter/core.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 576a9c0406a9..5ccff1d9f209 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c @@ -90,10 +90,12 @@ static void nf_set_hooks_head(struct net *net, const struct nf_hook_ops *reg, { switch (reg->pf) { case NFPROTO_NETDEV: +#ifdef CONFIG_NETFILTER_INGRESS /* We already checked in nf_register_net_hook() that this is * used from ingress. */ rcu_assign_pointer(reg->dev->nf_hooks_ingress, entry); +#endif break; default: rcu_assign_pointer(net->nf.hooks[reg->pf][reg->hooknum],