From patchwork Wed Jan 23 14:15:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 214952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 833752C0084 for ; Thu, 24 Jan 2013 01:15:29 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755785Ab3AWOP2 (ORCPT ); Wed, 23 Jan 2013 09:15:28 -0500 Received: from mail.us.es ([193.147.175.20]:38252 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755710Ab3AWOP1 (ORCPT ); Wed, 23 Jan 2013 09:15:27 -0500 Received: (qmail 29413 invoked from network); 23 Jan 2013 15:15:24 +0100 Received: from unknown (HELO us.es) (192.168.2.13) by us.es with SMTP; 23 Jan 2013 15:15:24 +0100 Received: (qmail 20724 invoked by uid 507); 23 Jan 2013 14:15:24 -0000 X-Qmail-Scanner-Diagnostics: from 127.0.0.1 by antivirus3 (envelope-from , uid 501) with qmail-scanner-2.10 (clamdscan: 0.97.6/16555. spamassassin: 3.3.2. Clear:RC:1(127.0.0.1):SA:0(-99.2/7.5):. Processed in 1.779029 secs); 23 Jan 2013 14:15:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on antivirus3 X-Spam-Level: X-Spam-Status: No, score=-99.2 required=7.5 tests=BAYES_50, RP_MATCHES_RCVD, SPF_HELO_FAIL, USER_IN_WHITELIST autolearn=disabled version=3.3.2 X-Envelope-From: pneira@us.es Received: from unknown (HELO antivirus3) (127.0.0.1) by us.es with SMTP; 23 Jan 2013 14:15:22 -0000 Received: from 192.168.1.13 (192.168.1.13) by antivirus3 (F-Secure/fsigk_smtp/407/antivirus3); Wed, 23 Jan 2013 15:15:22 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/407/antivirus3) Received: (qmail 29999 invoked from network); 23 Jan 2013 15:15:22 +0100 Received: from 1984.lsi.us.es (HELO us.es) (1984lsi@150.214.188.80) by us.es with AES128-SHA encrypted SMTP; 23 Jan 2013 15:15:22 +0100 Date: Wed, 23 Jan 2013 15:15:22 +0100 From: Pablo Neira Ayuso To: kbuild test robot Cc: Gao feng , netfilter-devel@vger.kernel.org Subject: Re: [nf-next:master 10/20] net/netfilter/nf_conntrack_standalone.c:566:2: error: 'nf_ct_netfilter_header' undeclared Message-ID: <20130123141522.GA17264@1984> References: <50ffea92.W3YbcwYaFKlgs8cR%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <50ffea92.W3YbcwYaFKlgs8cR%fengguang.wu@intel.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org On Wed, Jan 23, 2013 at 09:50:10PM +0800, kbuild test robot wrote: > tree: git://150.214.188.80/nf-next master > head: c296bb4d5d417d466c9bcc8afef68a3db5449a64 > commit: f94161c1bbdf7af11729cf106b4452f2432448e0 [10/20] netfilter: nf_conntrack: move initialization out of pernet operations > config: x86_64-randconfig-x974 (attached as .config) > > All error/warnings: > > net/netfilter/nf_conntrack_standalone.c: In function 'nf_conntrack_standalone_init': > >> net/netfilter/nf_conntrack_standalone.c:566:2: error: 'nf_ct_netfilter_header' undeclared (first use in this function) > net/netfilter/nf_conntrack_standalone.c:566:2: note: each undeclared identifier is reported only once for each function it appears in > >> net/netfilter/nf_conntrack_standalone.c:567:41: error: 'nf_ct_netfilter_table' undeclared (first use in this function) > net/netfilter/nf_conntrack_standalone.c: In function 'nf_conntrack_standalone_fini': > net/netfilter/nf_conntrack_standalone.c:591:30: error: 'nf_ct_netfilter_header' undeclared (first use in this function) Patch attached to fix this. Thanks kbuild test robot. From 5f9f946b39bff31bc9a4a8be18cef3354d3382ae Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 23 Jan 2013 15:12:25 +0100 Subject: [PATCH] netfilter: nf_conntrack: fix compilation if sysctl are disabled In (f94161c netfilter: nf_conntrack: move initialization out of pernet operations), some ifdefs were missing for sysctl dependent code. Reported-by: kbuild test robot Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_conntrack_standalone.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 725bf04..7936bf7 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c @@ -563,10 +563,14 @@ static int __init nf_conntrack_standalone_init(void) if (ret < 0) goto out_start; +#ifdef CONFIG_SYSCTL nf_ct_netfilter_header = register_net_sysctl(&init_net, "net", nf_ct_netfilter_table); - if (!nf_ct_netfilter_header) + if (!nf_ct_netfilter_header) { + pr_err("nf_conntrack: can't register to sysctl.\n"); goto out_sysctl; + } +#endif ret = register_pernet_subsys(&nf_conntrack_net_ops); if (ret < 0) @@ -576,9 +580,10 @@ static int __init nf_conntrack_standalone_init(void) return 0; out_pernet: +#ifdef CONFIG_SYSCTL unregister_net_sysctl_table(nf_ct_netfilter_header); out_sysctl: - pr_err("nf_conntrack: can't register to sysctl.\n"); +#endif nf_conntrack_cleanup_end(); out_start: return ret; @@ -588,7 +593,9 @@ static void __exit nf_conntrack_standalone_fini(void) { nf_conntrack_cleanup_start(); unregister_pernet_subsys(&nf_conntrack_net_ops); +#ifdef CONFIG_SYSCTL unregister_net_sysctl_table(nf_ct_netfilter_header); +#endif nf_conntrack_cleanup_end(); } -- 1.7.10.4