blob: fdda832be3850205264d5eb473c6fbf09acfe866 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/bash
# This testscase checks kernel picks a suitable set backends.
# Ruleset attempts to update from packet path, so set backend
# needs an ->update() implementation.
set -e
$NFT add table t
$NFT add set t s1 { type inet_proto \; }
$NFT add set t s2 { type ipv4_addr \; }
$NFT add set t s3 { type ipv4_addr \; size 1024\; }
$NFT add chain t c {type filter hook input priority 0 \; }
$NFT add rule t c meta iifname foobar set add ip protocol @s1
$NFT add rule t c meta iifname foobar set add ip daddr @s2
$NFT add rule t c meta iifname foobar set add ip daddr @s3
|