summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nf_nat.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_nat.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_nat.h')
-rw-r--r--include/net/netfilter/nf_nat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h
index f5f09f032a90..e966092a36f1 100644
--- a/include/net/netfilter/nf_nat.h
+++ b/include/net/netfilter/nf_nat.h
@@ -84,7 +84,11 @@ extern int nf_nat_used_tuple(const struct nf_conntrack_tuple *tuple,
static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct)
{
+#if defined(CONFIG_NF_NAT) || defined(CONFIG_NF_NAT_MODULE)
return nf_ct_ext_find(ct, NF_CT_EXT_NAT);
+#else
+ return NULL;
+#endif
}
#else /* !__KERNEL__: iptables wants this to compile. */