diff options
author | Patrick McHardy <kaber@trash.net> | 2011-01-20 14:46:52 -0500 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-01-20 14:46:52 -0500 |
commit | 2f1e3176723d74ea2dd975e5be0ef6bb4fed2e2e (patch) | |
tree | 5f8b12f4e3d58d67bb9c1c8d00ef4d7922e3ed8e | |
parent | 06988b06935da7a210887e9d3f50f46f2faa4953 (diff) |
netfilter: nf_conntrack: fix linker error with NF_CONNTRACK_TIMESTAMP=n
net/built-in.o: In function `nf_conntrack_init_net':
net/netfilter/nf_conntrack_core.c:1521:
undefined reference to `nf_conntrack_tstamp_init'
net/netfilter/nf_conntrack_core.c:1531:
undefined reference to `nf_conntrack_tstamp_fini'
Add dummy inline functions for the =n case to fix this.
Reported-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r-- | include/net/netfilter/nf_conntrack_timestamp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack_timestamp.h b/include/net/netfilter/nf_conntrack_timestamp.h index f17dcb664e29..fc9c82b1f06b 100644 --- a/include/net/netfilter/nf_conntrack_timestamp.h +++ b/include/net/netfilter/nf_conntrack_timestamp.h | |||
@@ -47,7 +47,19 @@ static inline void nf_ct_set_tstamp(struct net *net, bool enable) | |||
47 | net->ct.sysctl_tstamp = enable; | 47 | net->ct.sysctl_tstamp = enable; |
48 | } | 48 | } |
49 | 49 | ||
50 | #ifdef CONFIG_NF_CONNTRACK_TIMESTAMP | ||
50 | extern int nf_conntrack_tstamp_init(struct net *net); | 51 | extern int nf_conntrack_tstamp_init(struct net *net); |
51 | extern void nf_conntrack_tstamp_fini(struct net *net); | 52 | extern void nf_conntrack_tstamp_fini(struct net *net); |
53 | #else | ||
54 | static inline int nf_conntrack_tstamp_init(struct net *net) | ||
55 | { | ||
56 | return 0; | ||
57 | } | ||
58 | |||
59 | static inline void nf_conntrack_tstamp_fini(struct net *net) | ||
60 | { | ||
61 | return; | ||
62 | } | ||
63 | #endif /* CONFIG_NF_CONNTRACK_TIMESTAMP */ | ||
52 | 64 | ||
53 | #endif /* _NF_CONNTRACK_TSTAMP_H */ | 65 | #endif /* _NF_CONNTRACK_TSTAMP_H */ |