netfilter: ctnetlink: always honor CTA_MARK_MASK
authorAndreas Jaggi <andreas.jaggi@waterwave.ch>
Thu, 1 Nov 2018 05:50:33 +0000 (06:50 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 12 Nov 2018 09:25:00 +0000 (10:25 +0100)
commit58fc419be2313f8831ec75ad95263f050b69f476
tree7c9e797dd4a06a12818fd9efe183593be616e539
parent1226cfe3798a62ba78ff8f4a4abf2cad9d2dc779
netfilter: ctnetlink: always honor CTA_MARK_MASK

Useful to only set a particular range of the conntrack mark while
leaving existing parts of the value alone, e.g. when updating
conntrack marks via netlink from userspace.

For NFQUEUE it was already implemented in commit 534473c6080e
("netfilter: ctnetlink: honor CTA_MARK_MASK when setting ctmark").

This now adds the same functionality also for the other netlink
conntrack mark changes.

Signed-off-by: Andreas Jaggi <andreas.jaggi@waterwave.ch>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_netlink.c