Message ID | 20240626233845.151197-2-pablo@netfilter.org (mailing list archive) |
---|---|
State | Accepted |
Commit | aef5daa2c49d510436b733827d4f0bab79fcc4a0 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,1/2] netfilter: fix undefined reference to 'netfilter_lwtunnel_*' when CONFIG_SYSCTL=n | expand |
Hello: This series was applied to netdev/net.git (main) by Pablo Neira Ayuso <pablo@netfilter.org>: On Thu, 27 Jun 2024 01:38:44 +0200 you 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' > > [...] Here is the summary with links: - [net,1/2] netfilter: fix undefined reference to 'netfilter_lwtunnel_*' when CONFIG_SYSCTL=n https://git.kernel.org/netdev/net/c/aef5daa2c49d - [net,2/2] netfilter: nf_tables: fully validate NFT_DATA_VALUE on store to data registers https://git.kernel.org/netdev/net/c/7931d32955e0 You are awesome, thank you!
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 */