summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nf_conntrack_timeout.h
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2019-09-13 09:13:12 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-09-13 12:47:10 +0200
commit22e81d7416d04355a7dfa248f187feba641c199e (patch)
tree54f6816412827c90cda6807c186179d6998ba330 /include/net/netfilter/nf_conntrack_timeout.h
parent25d7cbcd2bb5d919b9ba6fcdfe788e72c2df7e6e (diff)
netfilter: conntrack: wrap two inline functions in config checks.
nf_conntrack_synproxy.h contains three inline functions. The contents of two of them are wrapped in CONFIG_NETFILTER_SYNPROXY checks and just return NULL if it is not enabled. The third does nothing if they return NULL, so wrap its contents as well. nf_ct_timeout_data is only called if CONFIG_NETFILTER_TIMEOUT is enabled. Wrap its contents in a CONFIG_NETFILTER_TIMEOUT check like the other inline functions in nf_conntrack_timeout.h. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nf_conntrack_timeout.h')
-rw-r--r--include/net/netfilter/nf_conntrack_timeout.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack_timeout.h b/include/net/netfilter/nf_conntrack_timeout.h
index 00a8fbb2d735..6dd72396f534 100644
--- a/include/net/netfilter/nf_conntrack_timeout.h
+++ b/include/net/netfilter/nf_conntrack_timeout.h
@@ -32,6 +32,7 @@ struct nf_conn_timeout {
static inline unsigned int *
nf_ct_timeout_data(const struct nf_conn_timeout *t)
{
+#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
struct nf_ct_timeout *timeout;
timeout = rcu_dereference(t->timeout);
@@ -39,6 +40,9 @@ nf_ct_timeout_data(const struct nf_conn_timeout *t)
return NULL;
return (unsigned int *)timeout->data;
+#else
+ return NULL;
+#endif
}
static inline