diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/py/any/rawpayload.t | 2 | ||||
-rwxr-xr-x | tests/shell/testcases/sets/0037_set_with_inet_service_0 | 6 | ||||
-rw-r--r-- | tests/shell/testcases/sets/dumps/0037_set_with_inet_service_0.nft | 16 |
3 files changed, 23 insertions, 1 deletions
diff --git a/tests/py/any/rawpayload.t b/tests/py/any/rawpayload.t index 9a3402f1..c3382a96 100644 --- a/tests/py/any/rawpayload.t +++ b/tests/py/any/rawpayload.t @@ -4,7 +4,7 @@ *inet;test-inet;input *netdev;test-netdev;ingress -meta l4proto { tcp, udp, sctp} @th,16,16 { 22, 23, 80 };ok;meta l4proto { 6, 17, 132} @th,16,16 { 22, 23, 80} +meta l4proto { tcp, udp, sctp} @th,16,16 { 22, 23, 80 };ok;meta l4proto { 6, 17, 132} th dport { 22, 23, 80} meta l4proto tcp @th,16,16 { 22, 23, 80};ok;tcp dport { 22, 23, 80} @nh,8,8 255;ok @nh,8,16 0;ok diff --git a/tests/shell/testcases/sets/0037_set_with_inet_service_0 b/tests/shell/testcases/sets/0037_set_with_inet_service_0 new file mode 100755 index 00000000..07820b7c --- /dev/null +++ b/tests/shell/testcases/sets/0037_set_with_inet_service_0 @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e +dumpfile=$(dirname $0)/dumps/$(basename $0).nft + +$NFT -f "$dumpfile" diff --git a/tests/shell/testcases/sets/dumps/0037_set_with_inet_service_0.nft b/tests/shell/testcases/sets/dumps/0037_set_with_inet_service_0.nft new file mode 100644 index 00000000..0e85f7c2 --- /dev/null +++ b/tests/shell/testcases/sets/dumps/0037_set_with_inet_service_0.nft @@ -0,0 +1,16 @@ +table inet filter { + set myset { + type ipv4_addr . inet_proto . inet_service + elements = { 192.168.0.12 . tcp . 53, + 192.168.0.12 . tcp . 80, + 192.168.0.12 . udp . 53, + 192.168.0.13 . tcp . 80, + 192.168.0.113 . tcp . 22 } + } + + chain forward { + type filter hook forward priority filter; policy drop; + ct state established,related accept + ct state new ip daddr . ip protocol . th dport @myset accept + } +} |