summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6/sets.t
blob: add82eb8feb8ae94afee3dcb1d3a3ecd3e687d99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
:input;type filter hook input priority 0
:ingress;type filter hook ingress device lo priority 0

*ip6;test-ip6;input
*inet;test-inet;input
*netdev;test-netdev;ingress

!w type ipv6_addr;ok
!x type inet_proto;ok
!y type inet_service;ok
!z type time;ok

?set2 192.168.3.4;fail
!set2 type ipv6_addr;ok
?set2 1234:1234::1234:1234:1234:1234:1234;ok
?set2 1234:1234::1234:1234:1234:1234:1234;ok
?set2 1234::1234:1234:1234;ok
?set2 1234:1234:1234:1234:1234::1234:1234, 1234:1234::123;ok
?set2 192.168.3.8, 192.168.3.9;fail
?set2 1234:1234::1234:1234:1234:1234;ok
?set2 1234:1234::1234:1234:1234:1234;ok
?set2 1234:1234:1234::1234;ok

ip6 saddr @set2 drop;ok
ip6 saddr != @set2 drop;ok
ip6 saddr @set33 drop;fail
ip6 saddr != @set33 drop;fail

!set3 type ipv6_addr flags interval;ok
?set3 1234:1234:1234:1234::/64;ok
?set3 1324:1234:1234:1235::/64;ok
?set3 1324:1234:1234:1233::/64;ok
?set3 1234:1234:1234:1234:1234:1234:/96;fail
?set3 1324:1234:1234:1236::/64;ok

!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
add @set5 { ip6 saddr . ip6 daddr };ok
delete @set5 { ip6 saddr . ip6 daddr };ok