Included bogon triggers:
nft: src/evaluate.c:2267: expr_evaluate_mapping: Assertion `set->data != NULL' failed.
After this fix, following errors will be shown:
Error: unqualified type invalid specified in map definition. Try "typeof expression" instead of "type datatype".
map m {
^
map m {
^
Error: map has no mapping data
Fixes: 343a51702656 ("src: store expr, not dtype to track data in sets")
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
"Key must be a constant");
mapping->flags |= mapping->left->flags & EXPR_F_SINGLETON;
- assert(set->data != NULL);
+ /* This can happen for malformed map definitions */
+ if (!set->data)
+ return set_error(ctx, set, "map has no mapping data");
+
if (!set_is_anonymous(set->flags) &&
set->data->flags & EXPR_F_INTERVAL)
datalen = set->data->len / 2;
--- /dev/null
+table ip x {
+ map m {
+ typeof ct saddr :ct expectation
+ elements = { * : none}
+ }
+}