diff options
Diffstat (limited to 'test/network/ip6_netfilter.exp')
-rwxr-xr-x | test/network/ip6_netfilter.exp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/network/ip6_netfilter.exp b/test/network/ip6_netfilter.exp new file mode 100755 index 000000000..6c478d9e7 --- /dev/null +++ b/test/network/ip6_netfilter.exp | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # check default netfilter on br0 | ||
11 | send -- "firejail --name=test --net=br0 --netfilter6=ip6_netfilter.profile\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
15 | } | ||
16 | sleep 2 | ||
17 | spawn $env(SHELL) | ||
18 | |||
19 | # check default netfilter no new network | ||
20 | send -- "firejail --netfilter6.print=test\r" | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 1\n";exit} | ||
23 | "DROP" | ||
24 | } | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 2\n";exit} | ||
27 | "2001:db8:1f0a:3ec::2" | ||
28 | } | ||
29 | |||
30 | after 500 | ||
31 | puts "all done\n" | ||