On Tue, Dec 05, 2023 at 02:09:19PM +0100, Florian Westphal wrote: > tests/shell/testcases/bogons/nft-f/set_definition_with_no_key_assert > BUG: unhandled key type 2 > nft: src/intervals.c:59: setelem_expr_to_range: Assertion `0' failed. > > Fixes: 3975430b12d9 ("src: expand table command before evaluation") > Signed-off-by: Florian Westphal <fw@xxxxxxxxx> > --- > include/intervals.h | 1 - > src/intervals.c | 60 +++++++++++++++---- > .../nft-f/set_definition_with_no_key_assert | 12 ++++ > 3 files changed, 60 insertions(+), 13 deletions(-) > create mode 100644 tests/shell/testcases/bogons/nft-f/set_definition_with_no_key_assert > [...] > diff --git a/src/intervals.c b/src/intervals.c > index 85de0199c373..7181af58013e 100644 > --- a/src/intervals.c > +++ b/src/intervals.c > @@ -13,7 +13,9 @@ > #include <intervals.h> > #include <rule.h> > > -static void setelem_expr_to_range(struct expr *expr) > +static int set_to_range(struct expr *init); > + > +static int setelem_expr_to_range(struct expr *expr) > { > unsigned char data[sizeof(struct in6_addr) * BITS_PER_BYTE]; > struct expr *key, *value; > @@ -55,9 +57,13 @@ static void setelem_expr_to_range(struct expr *expr) > expr_free(expr->key); > expr->key = key; > break; > + case EXPR_SYMBOL: > + return -1; How can we get EXPR_SYMBOL in this path?