diff options
author | Joe Stringer <joe@ovn.org> | 2015-12-08 16:14:07 -0800 |
---|---|---|
committer | Joe Stringer <joe@ovn.org> | 2015-12-10 16:13:54 -0800 |
commit | b41e3e99d462f7df05d60b9e24355eed9e13ab31 (patch) | |
tree | d873d6138fa8e75b6fc50bafe52e9d461a73cea1 /datapath | |
parent | f23593a18fb6d832c9140144cb1cbac5eb114b3d (diff) | |
download | openvswitch-b41e3e99d462f7df05d60b9e24355eed9e13ab31.tar.gz |
datapath: Define nf_connlabels_{put,get}.
Previously this was only done when connlabels were enabled in the kernel
config, even if the functions didn't exist. Fix the compile error.
Fixes: d70a6ff5d40d ("datapath: Define nf_connlabels_{put,get}.")
Reported-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h b/datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h index e49a289c5..88413e763 100644 --- a/datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h +++ b/datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h @@ -5,8 +5,8 @@ #include <linux/version.h> #include_next <net/netfilter/nf_conntrack_labels.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) && \ - IS_ENABLED(CONFIG_NF_CONNTRACK_LABELS) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) +#if IS_ENABLED(CONFIG_NF_CONNTRACK_LABELS) #ifndef NF_CT_LABELS_MAX_SIZE #define NF_CT_LABELS_MAX_SIZE ((XT_CONNLABEL_MAXBIT + 1) / BITS_PER_BYTE) @@ -37,5 +37,13 @@ static inline void nf_connlabels_put(struct net *net) net->ct.label_words = 0; } -#endif +#else /* CONFIG_NF_CONNTRACK_LABELS */ +static inline int nf_connlabels_get(struct net *net, unsigned int n_bits) +{ + return -ERANGE; +} + +static inline void nf_connlabels_put(struct net *net) { } +#endif /* CONFIG_NF_CONNTRACK_LABELS */ +#endif /* 4.3 */ #endif /* _NF_CONNTRACK_LABELS_WRAPPER_H */ |