Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+12
+12
include/net/netfilter/nf_conntrack_timestamp.h
··· 47 47 net->ct.sysctl_tstamp = enable; 48 48 } 49 49 50 + #ifdef CONFIG_NF_CONNTRACK_TIMESTAMP 50 51 extern int nf_conntrack_tstamp_init(struct net *net); 51 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 65 #endif /* _NF_CONNTRACK_TSTAMP_H */