diff options
author | netblue30 <netblue30@yahoo.com> | 2016-01-13 11:08:04 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-01-13 11:08:04 -0500 |
commit | bad6d369aeb682ba07d018927154cc833f0b9db6 (patch) | |
tree | 242e49b6349d23190d6ebc65677e71aaea4d215e /test | |
parent | added kmail profile (diff) | |
download | firejail-bad6d369aeb682ba07d018927154cc833f0b9db6.tar.gz firejail-bad6d369aeb682ba07d018927154cc833f0b9db6.tar.zst firejail-bad6d369aeb682ba07d018927154cc833f0b9db6.zip |
ipv6 support
Diffstat (limited to 'test')
-rwxr-xr-x | test/ip6.exp | 46 | ||||
-rw-r--r-- | test/ipv6.net | 8 | ||||
-rwxr-xr-x | test/test.sh | 3 |
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 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --debug --noprofile --net=eth0 --ip6=2001:0db8:0:f101::1/64 --netfilter6=ipv6.net\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Installing network filter" | ||
11 | } | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "DROP" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 1\n";exit} | ||
18 | "DROP" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "2001:db8:1f0a:3ec::2/128" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 1\n";exit} | ||
26 | "Child process initialized" | ||
27 | } | ||
28 | sleep 2 | ||
29 | |||
30 | send -- "/sbin/ifconfig\r" | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 1\n";exit} | ||
33 | "inet6 addr" | ||
34 | } | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 1\n";exit} | ||
37 | "2001:db8:0:f101::1/64" | ||
38 | } | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 1\n";exit} | ||
41 | "Scope:Global" | ||
42 | } | ||
43 | |||
44 | |||
45 | puts "\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 | ||
7 | COMMIT | ||
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" | |||
256 | echo "TESTING: quiet" | 256 | echo "TESTING: quiet" |
257 | ./quiet.exp | 257 | ./quiet.exp |
258 | 258 | ||
259 | echo "TESTING: IPv6 support" | ||
260 | ./ip6.exp | ||
261 | |||
259 | echo "TESTING: local network" | 262 | echo "TESTING: local network" |
260 | ./net_local.exp | 263 | ./net_local.exp |
261 | 264 | ||