From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jianguo Wu <wujianguo106@163.com>
Cc: LKML <linux-kernel@vger.kernel.org>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: fix undefined reference to 'netfilter_lwtunnel_*' when CONFIG_SYSCTL=n
Date: Fri, 21 Jun 2024 13:43:42 +0200 [thread overview]
Message-ID: <ZnVnbv9sBtmflZj-@calendula> (raw)
In-Reply-To: <24ac3144-c6bc-4fd9-b592-d1a88505e65a@163.com>
Cc'ing netfilter-devel
On Fri, Jun 21, 2024 at 10:41:13AM +0800, Jianguo Wu wrote:
> From: Jianguo Wu <wujianguo@chinatelecom.cn>
>
> if CONFIG_SYSFS is not enabled in config, we get the below compile error,
>
> All errors (new ones prefixed by >>):
>
> csky-linux-ld: net/netfilter/core.o: in function `netfilter_init':
> core.c:(.init.text+0x42): undefined reference to `netfilter_lwtunnel_init'
> >> csky-linux-ld: core.c:(.init.text+0x56): undefined reference to `netfilter_lwtunnel_fini'
> >> csky-linux-ld: core.c:(.init.text+0x70): undefined reference to `netfilter_lwtunnel_init'
> csky-linux-ld: core.c:(.init.text+0x78): undefined reference to `netfilter_lwtunnel_fini'
>
> Fixes: a2225e0250c5 ("netfilter: move the sysctl nf_hooks_lwtunnel into the netfilter core")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202406210511.8vbByYj3-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202406210520.6HmrUaA2-lkp@intel.com/
> Signed-off-by: Jianguo Wu <wujianguo@chinatelecom.cn>
> ---
> net/netfilter/nf_hooks_lwtunnel.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/netfilter/nf_hooks_lwtunnel.c b/net/netfilter/nf_hooks_lwtunnel.c
> index 7cdb59bb4459..d8ebebc9775d 100644
> --- a/net/netfilter/nf_hooks_lwtunnel.c
> +++ b/net/netfilter/nf_hooks_lwtunnel.c
> @@ -117,4 +117,7 @@ void netfilter_lwtunnel_fini(void)
> {
> unregister_pernet_subsys(&nf_lwtunnel_net_ops);
> }
> +#else
> +int __init netfilter_lwtunnel_init(void) { return 0; }
> +void netfilter_lwtunnel_fini(void) {}
> #endif /* CONFIG_SYSCTL */
> --
> 1.8.3.1
>
prev parent reply other threads:[~2024-06-21 11:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 2:41 Jianguo Wu
2024-06-21 11:43 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZnVnbv9sBtmflZj-@calendula \
--to=pablo@netfilter.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=wujianguo106@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome