summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-09-14 22:59:13 +0200
committerFlorian Westphal <fw@strlen.de>2017-09-27 15:18:14 +0200
commitda06a74244cbe4b02431ea2c34b8299f3562c9ff (patch)
tree5f060ff612d59e67d15b3ac796c9af85d6dd9d14 /include
parent027734420b213560ab7e261d6b4b969e16e97343 (diff)
src: store expression as set key instead of data type
Doing so retains legth information in case of unqualified data types, e.g. we now have 'meta iifname' expression instead of an (unqualified) string type. This allows to eventually use iifnames as set keys without adding yet another special data type for them. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/rule.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/rule.h b/include/rule.h
index 89a6da68..e2a5c87b 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -212,8 +212,7 @@ extern struct rule *rule_lookup(const struct chain *chain, uint64_t handle);
* @flags: bitmask of set flags
* @gc_int: garbage collection interval
* @timeout: default timeout value
- * @keytype: key data type
- * @keylen: key length
+ * @key: key expression (data type, length))
* @datatype: mapping data type
* @datalen: mapping data len
* @objtype: mapping object type
@@ -230,8 +229,7 @@ struct set {
uint32_t flags;
uint32_t gc_int;
uint64_t timeout;
- const struct datatype *keytype;
- unsigned int keylen;
+ struct expr *key;
const struct datatype *datatype;
unsigned int datalen;
uint32_t objtype;