]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: prepare to store expr key rather than datatype
authorFlorian Westphal <fw@strlen.de>
Fri, 15 Sep 2017 00:46:16 +0000 (02:46 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 27 Sep 2017 12:27:28 +0000 (14:27 +0200)
commit027734420b213560ab7e261d6b4b969e16e97343
tree193111586c6c428f29648e10b7339eb1734d08a6
parent46af5681f59b06215e781e940c5c0694150b714e
evaluate: prepare to store expr key rather than datatype

currently set definitions store a datatype rather than
an expression.

In order to support use of unqualified data types (string in particular),
this prepares implicit set definition helper to expect an expression instead
of plain data type.  This also has the advantage that we can use EXPR_CONCAT
to retain the original expressions when key concatentation is used, e.g.
'meta iifname . tcp dport'.  The netlink serialization code can use
this info to store individual key lengths independently of data types.

Would also allow later on to store the original names of the
expressions, e.g. "ip daddr", in the kernel to support a future
typeof keyword, e.g. 'type typeof(ip daddr)' instead of 'type ipv4_addr'.

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