summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2016-06-20 18:51:09 -0700
committerJarno Rajahalme <jarno@ovn.org>2016-06-20 18:51:09 -0700
commit7f2ab8cd23cb6b64f931ece00b4cc1cda4cacb72 (patch)
tree140eefdc90fbb3739fd5e26c794150c31ba65268 /acinclude.m4
parent90b01477888abe12c94fc9f3a789e0007d7875c0 (diff)
downloadopenvswitch-7f2ab8cd23cb6b64f931ece00b4cc1cda4cacb72.tar.gz
datapath: change nf_connlabels_get bit arg to 'highest used'
Upstream commit: commit adff6c65600000ec2bb71840c943ee12668080f5 Author: Florian Westphal <fw@strlen.de> Date: Tue Apr 12 18:14:25 2016 +0200 netfilter: connlabels: change nf_connlabels_get bit arg to 'highest used' nf_connlabel_set() takes the bit number that we would like to set. nf_connlabels_get() however took the number of bits that we want to support. So e.g. nf_connlabels_get(32) support bits 0 to 31, but not 32. This changes nf_connlabels_get() to take the highest bit that we want to set. Callers then don't have to cope with a potential integer wrap when using nf_connlabels_get(bit + 1) anymore. Current callers are fine, this change is only to make folloup nft ct label set support simpler. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Jarno Rajahalme <jarno@ovn.org> OVS compat code defined nf_connlabels_get() if it was missing. Now we redefine it if it is missing, or if it has the old signature. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m43
1 files changed, 3 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 6b6e06378..52d0209ab 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -468,6 +468,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
[nf_ct_zone_init])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_labels.h],
[nf_connlabels_get])
+ OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_labels.h],
+ [nf_connlabels_get], [int bit],
+ [OVS_DEFINE([HAVE_NF_CONNLABELS_GET_TAKES_BIT])])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/ipv6/nf_defrag_ipv6.h],
[nf_ct_frag6_consume_orig])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/ipv6/nf_defrag_ipv6.h],