summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nf_conntrack_ecache.h
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-11-15 12:23:24 +0100
committerPatrick McHardy <kaber@trash.net>2010-11-15 12:23:24 +0100
commite0e76c83becc7536e8371e560504d836d34fcf7d (patch)
tree9a2f63014e06aee37815dfa20394a79c351739f0 /include/net/netfilter/nf_conntrack_ecache.h
parent76a2d3bcfcc86e2a8044258515b86492a37631a3 (diff)
netfilter: ct_extend: define NF_CT_EXT_* as needed
Less IDs make nf_ct_ext smaller. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/net/netfilter/nf_conntrack_ecache.h')
-rw-r--r--include/net/netfilter/nf_conntrack_ecache.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h
index 96ba5f7dcab6..f596b60d6d75 100644
--- a/include/net/netfilter/nf_conntrack_ecache.h
+++ b/include/net/netfilter/nf_conntrack_ecache.h
@@ -23,12 +23,17 @@ struct nf_conntrack_ecache {
static inline struct nf_conntrack_ecache *
nf_ct_ecache_find(const struct nf_conn *ct)
{
+#ifdef CONFIG_NF_CONNTRACK_EVENTS
return nf_ct_ext_find(ct, NF_CT_EXT_ECACHE);
+#else
+ return NULL;
+#endif
}
static inline struct nf_conntrack_ecache *
nf_ct_ecache_ext_add(struct nf_conn *ct, u16 ctmask, u16 expmask, gfp_t gfp)
{
+#ifdef CONFIG_NF_CONNTRACK_EVENTS
struct net *net = nf_ct_net(ct);
struct nf_conntrack_ecache *e;
@@ -45,6 +50,9 @@ nf_ct_ecache_ext_add(struct nf_conn *ct, u16 ctmask, u16 expmask, gfp_t gfp)
e->expmask = expmask;
}
return e;
+#else
+ return NULL;
+#endif
};
#ifdef CONFIG_NF_CONNTRACK_EVENTS