Commit 2f1e3176 authored by Patrick McHardy's avatar Patrick McHardy

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: default avatarJohn Fastabend <john.r.fastabend@intel.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 06988b06
...@@ -47,7 +47,19 @@ static inline void nf_ct_set_tstamp(struct net *net, bool enable) ...@@ -47,7 +47,19 @@ static inline void nf_ct_set_tstamp(struct net *net, bool enable)
net->ct.sysctl_tstamp = enable; net->ct.sysctl_tstamp = enable;
} }
#ifdef CONFIG_NF_CONNTRACK_TIMESTAMP
extern int nf_conntrack_tstamp_init(struct net *net); extern int nf_conntrack_tstamp_init(struct net *net);
extern void nf_conntrack_tstamp_fini(struct net *net); extern void nf_conntrack_tstamp_fini(struct net *net);
#else
static inline int nf_conntrack_tstamp_init(struct net *net)
{
return 0;
}
static inline void nf_conntrack_tstamp_fini(struct net *net)
{
return;
}
#endif /* CONFIG_NF_CONNTRACK_TIMESTAMP */
#endif /* _NF_CONNTRACK_TSTAMP_H */ #endif /* _NF_CONNTRACK_TSTAMP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment