From 22d2010109193e6ee201d7cd4e8aaf5cda4539a0 Mon Sep 17 00:00:00 2001 From: "Anders K. Pedersen" Date: Wed, 4 Oct 2017 14:27:45 +0000 Subject: netlink_linearize: skip set element expression in set statement key Before this patch the following fails: # nft add rule ip6 filter x \ set add ip6 saddr . ip6 daddr @test nft: netlink_linearize.c:648: netlink_gen_expr: Assertion `dreg < ctx->reg_low' failed. Aborted This is was previously fixed for flow statements in fbea4a6f4449 ("netlink_linearize: skip set element expression in flow table key"), and this patch implements the same change for set statements by using the set element key in netlink_gen_set_stmt(). nft-test.py is updated to support set types with concatenated data types in order to support testing of this. Signed-off-by: Anders K. Pedersen Signed-off-by: Pablo Neira Ayuso --- tests/py/ip6/sets.t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/py/ip6/sets.t') diff --git a/tests/py/ip6/sets.t b/tests/py/ip6/sets.t index 3ea2d833..54aa1e4b 100644 --- a/tests/py/ip6/sets.t +++ b/tests/py/ip6/sets.t @@ -36,3 +36,7 @@ ip6 saddr != @set33 drop;fail !set4 type ipv6_addr flags interval;ok ?set4 1234:1234:1234:1234::/64 4321:1234:1234:1234::/64;ok ?set4 4321:1234:1234:1234:1234:1234::/96;fail + +!set5 type ipv6_addr . ipv6_addr;ok +ip6 saddr . ip6 daddr @set5 drop;ok +set add ip6 saddr . ip6 daddr @set5;ok -- cgit v1.2.3