]> git.ipfire.org Git - thirdparty/nftables.git/commit
segtree: add string "range" reversal support
authorFlorian Westphal <fw@strlen.de>
Sat, 9 Apr 2022 13:58:29 +0000 (15:58 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 13 Apr 2022 11:43:37 +0000 (13:43 +0200)
commit5e393ea1fc0ad6b59e90103bf83e93b2449d519e
tree6f300e461b22905be68d93e5009b140e21a2dd2f
parent2fb4d7ead460ec4fb00bd317d93a5e076f825b39
segtree: add string "range" reversal support

Previous commits allows to use set key as a range, i.e.

key ifname
flags interval
elements = { eth* }

and then have it match on any interface starting with 'eth'.

Listing is broken however, we need to reverse-translate the (128bit)
number back to a string.

'eth*' is stored as interval
00687465 0000000 ..  00697465 0000000, i.e. "eth-eti",
this adds the needed endianess fixups.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/segtree.c