]> git.ipfire.org Git - thirdparty/iptables.git/commit
extensions: libxt_CONNMARK: Support bit-shifting for --restore,set and save-mark
authorJack Ma <jack.ma@alliedtelesis.co.nz>
Tue, 24 Apr 2018 02:58:57 +0000 (14:58 +1200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 8 May 2018 12:52:39 +0000 (14:52 +0200)
commitdb7b4e0de960c0ff86b10a3d303b4765dba13d6a
tree4de1e9c09890119bcac9bab1924b95f892a6d3f3
parent155e1c0c783158b3b55967a99233d37b4b3d1490
extensions: libxt_CONNMARK: Support bit-shifting for --restore,set and save-mark

This patch adds a new feature to iptables that allow bitshifting for
--restore,set and save-mark operations. This allows existing logic
operators (and, or and xor) and mask to co-operate with new bitshift
operations.

The intention is to provide uses with more fexible uses of skb->mark
and ct->mark. For example, users can save extra bits in skb->mark:
        skb->mark = ct->mark << 8;

Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Jack Ma <jack.ma@alliedtelesis.co.nz>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_CONNMARK.c
include/linux/netfilter/xt_connmark.h