[Devel] [PATCH vz9] net: conntrack: fix typo in limiting conntrack allocations

Nikita Yushchenko nikita.yushchenko at virtuozzo.com
Wed Oct 27 11:34:12 MSK 2021


Due to that typo, conntrack got completely disabled.

Fix the typo, and also export symbol that becomes required as soon as
the typo gets fixed.

Fixes: 0471849583d7 ("net: Primitives to enable conntrack allocation")
Signed-off-by: Nikita Yushchenko <nikita.yushchenko at virtuozzo.com>
---
 include/net/netfilter/nf_conntrack.h    | 2 +-
 net/netfilter/nf_conntrack_standalone.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 5ea56d272c19..6b1a42354975 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -366,7 +366,7 @@ static inline struct nf_conntrack_net *nf_ct_pernet(const struct net *net)
 
 static inline void allow_conntrack_allocation(struct net *net)
 {
-#if IS_ENABLED(NF_CONNTRACK)
+#if IS_ENABLED(CONFIG_NF_CONNTRACK)
 	nf_ct_pernet(net)->can_alloc = true;
 #endif
 }
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 7085d1a94298..1fa82b4eb2ec 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -29,6 +29,7 @@ MODULE_PARM_DESC(enable_hooks, "Always enable conntrack hooks");
 module_param(enable_hooks, bool, 0000);
 
 unsigned int nf_conntrack_net_id __read_mostly;
+EXPORT_SYMBOL_GPL(nf_conntrack_net_id);
 
 #ifdef CONFIG_NF_CONNTRACK_PROCFS
 void
-- 
2.30.2



More information about the Devel mailing list