From: Florian Westphal Date: Fri, 11 Jan 2013 06:30:46 +0000 (+0000) Subject: netfilter: ctnetlink: allow userspace to modify labels X-Git-Tag: v3.9-rc1~139^2~269^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b21f6a90924dfe8e5e686c314ddb441fb06501e;p=pandora-kernel.git netfilter: ctnetlink: allow userspace to modify labels Add the ability to set/clear labels assigned to a conntrack via ctnetlink. To allow userspace to only alter specific bits, Pablo suggested to add a new CTA_LABELS_MASK attribute: The new set of active labels is then determined via active = (active & ~mask) ^ changeset i.e., the mask selects those bits in the existing set that should be changed. This follows the same method already used by MARK and CONNMARK targets. Omitting CTA_LABELS_MASK is the same as setting all bits in CTA_LABELS_MASK to 1: The existing set is replaced by the one from userspace. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- Reading git-diff-tree failed