aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-01-13 11:08:04 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-01-13 11:08:04 -0500
commitbad6d369aeb682ba07d018927154cc833f0b9db6 (patch)
tree242e49b6349d23190d6ebc65677e71aaea4d215e /test
parentadded kmail profile (diff)
downloadfirejail-bad6d369aeb682ba07d018927154cc833f0b9db6.tar.gz
firejail-bad6d369aeb682ba07d018927154cc833f0b9db6.tar.zst
firejail-bad6d369aeb682ba07d018927154cc833f0b9db6.zip
ipv6 support
Diffstat (limited to 'test')
-rwxr-xr-xtest/ip6.exp46
-rw-r--r--test/ipv6.net8
-rwxr-xr-xtest/test.sh3
3 files changed, 57 insertions, 0 deletions
diff --git a/test/ip6.exp b/test/ip6.exp
new file mode 100755
index 000000000..4dc11d3dc
--- /dev/null
+++ b/test/ip6.exp
@@ -0,0 +1,46 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --debug --noprofile --net=eth0 --ip6=2001:0db8:0:f101::1/64 --netfilter6=ipv6.net\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Installing network filter"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "DROP"
15}
16expect {
17 timeout {puts "TESTING ERROR 1\n";exit}
18 "DROP"
19}
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "2001:db8:1f0a:3ec::2/128"
23}
24expect {
25 timeout {puts "TESTING ERROR 1\n";exit}
26 "Child process initialized"
27}
28sleep 2
29
30send -- "/sbin/ifconfig\r"
31expect {
32 timeout {puts "TESTING ERROR 1\n";exit}
33 "inet6 addr"
34}
35expect {
36 timeout {puts "TESTING ERROR 1\n";exit}
37 "2001:db8:0:f101::1/64"
38}
39expect {
40 timeout {puts "TESTING ERROR 1\n";exit}
41 "Scope:Global"
42}
43
44
45puts "\nall done\n"
46
diff --git a/test/ipv6.net b/test/ipv6.net
new file mode 100644
index 000000000..cc8f22943
--- /dev/null
+++ b/test/ipv6.net
@@ -0,0 +1,8 @@
1# Generated by ip6tables-save v1.4.14 on Wed Jan 13 10:53:40 2016
2*filter
3:INPUT ACCEPT [0:0]
4:FORWARD ACCEPT [0:0]
5:OUTPUT ACCEPT [0:0]
6-A INPUT -s 2001:db8:1f0a:3ec::2/128 -j DROP
7COMMIT
8# Completed on Wed Jan 13 10:53:40 2016
diff --git a/test/test.sh b/test/test.sh
index ab288cbeb..44bb7ba99 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -256,6 +256,9 @@ echo "TESTING: read/write /dev/shm"
256echo "TESTING: quiet" 256echo "TESTING: quiet"
257./quiet.exp 257./quiet.exp
258 258
259echo "TESTING: IPv6 support"
260./ip6.exp
261
259echo "TESTING: local network" 262echo "TESTING: local network"
260./net_local.exp 263./net_local.exp
261 264