selftests: netfilter: Add correctness test for mac,net set type
authorStefano Brivio <sbrivio@redhat.com>
Sat, 27 Nov 2021 10:33:38 +0000 (11:33 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 8 Dec 2021 00:05:55 +0000 (01:05 +0100)
commit0de53b0ffb5b22b52c1e0bd4d9e18cbbce5801d0
tree19736be61c5107a905586920e2b0696ad4b988a3
parentb7e945e228d7df1b1473ef6fd2cdec67433065fb
selftests: netfilter: Add correctness test for mac,net set type

The existing net,mac test didn't cover the issue recently reported
by Nikita Yushchenko, where MAC addresses wouldn't match if given
as first field of a concatenated set with AVX2 and 8-bit groups,
because there's a different code path covering the lookup of six
8-bit groups (MAC addresses) if that's the first field.

Add a similar mac,net test, with MAC address and IPv4 address
swapped in the set specification.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/netfilter/nft_concat_range.sh