Skip to content

Commit

Permalink
netfilter: nf_conntrack: fix linker error with NF_CONNTRACK_TIMESTAMP=n
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy committed Jan 20, 2011
1 parent 06988b0 commit 2f1e317
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/net/netfilter/nf_conntrack_timestamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,19 @@ static inline void nf_ct_set_tstamp(struct net *net, bool enable)
net->ct.sysctl_tstamp = enable;
}

#ifdef CONFIG_NF_CONNTRACK_TIMESTAMP
extern int nf_conntrack_tstamp_init(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 */

0 comments on commit 2f1e317

Please sign in to comment.