]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - net/netfilter/nft_ct.c
netfilter: connlabels: change nf_connlabels_get bit arg to 'highest used'
authorFlorian Westphal <fw@strlen.de>
Tue, 12 Apr 2016 16:14:25 +0000 (18:14 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 18 Apr 2016 18:39:48 +0000 (20:39 +0200)
commitadff6c65600000ec2bb71840c943ee12668080f5
tree4d997d6be491c820c95302299034d62f55c8387d
parent5a8145f7b22269adaf9e98b160a20486d1ad5669
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>
include/net/netfilter/nf_conntrack_labels.h
net/netfilter/nf_conntrack_labels.c
net/netfilter/nft_ct.c
net/netfilter/xt_connlabel.c
net/openvswitch/conntrack.c