aboutsummaryrefslogtreecommitdiffstats
path: root/test/net_defaultgw.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-04 22:01:33 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-04 22:01:33 -0400
commit54fc70b7bf4e3f74c63d068a873de5a9ddf78330 (patch)
tree98e15626d9271b14f8208e29debbb6685eb0d65a /test/net_defaultgw.exp
parentgrsecurity: --join, --shutdown (diff)
downloadfirejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.tar.gz
firejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.tar.zst
firejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.zip
grsecurity: network testing
Diffstat (limited to 'test/net_defaultgw.exp')
-rwxr-xr-xtest/net_defaultgw.exp35
1 files changed, 8 insertions, 27 deletions
diff --git a/test/net_defaultgw.exp b/test/net_defaultgw.exp
index 9820660b7..840f2ccac 100755
--- a/test/net_defaultgw.exp
+++ b/test/net_defaultgw.exp
@@ -5,7 +5,7 @@ spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7# check ip address 7# check ip address
8send -- "firejail --net=br0 --ip=10.10.20.5 --defaultgw=10.10.20.2\r" 8send -- "firejail --net=br0 --ip=10.10.20.5 --defaultgw=10.10.20.2 --protocol=unix,inet,netlink\r"
9expect { 9expect {
10 timeout {puts "TESTING ERROR 0\n";exit} 10 timeout {puts "TESTING ERROR 0\n";exit}
11 "eth0" 11 "eth0"
@@ -26,40 +26,21 @@ expect {
26 timeout {puts "TESTING ERROR 4\n";exit} 26 timeout {puts "TESTING ERROR 4\n";exit}
27 "Child process initialized" 27 "Child process initialized"
28} 28}
29sleep 1
29 30
30# check default gateway 31# check default gateway
31send -- "bash\r" 32send -- "ip route show\r"
32sleep 1
33send -- "netstat -rn;pwd\r"
34expect { 33expect {
35 timeout {puts "TESTING ERROR 10.1\n";exit} 34 timeout {puts "TESTING ERROR 10.1\n";exit}
36 "0.0.0.0" 35 "default via 10.10.20.2 dev eth0"
37} 36}
37
38send -- "ip route show\r"
38expect { 39expect {
39 timeout {puts "TESTING ERROR 10.2\n";exit} 40 timeout {puts "TESTING ERROR 10.2\n";exit}
40 "10.10.20.2" 41 "10.10.20.0/29 dev eth0 proto kernel scope link"
41}
42expect {
43 timeout {puts "TESTING ERROR 10.3\n";exit}
44 "eth0"
45}
46expect {
47 timeout {puts "TESTING ERROR 10.4\n";exit}
48 "10.10.20.0"
49}
50expect {
51 timeout {puts "TESTING ERROR 10.5\n";exit}
52 "0.0.0.0"
53}
54expect {
55 timeout {puts "TESTING ERROR 10.6\n";exit}
56 "eth0"
57}
58expect {
59 timeout {puts "TESTING ERROR 10\n";exit}
60 "home"
61} 42}
62sleep 1 43sleep 1
63 44
64puts "\n" 45puts "\nall done\n"
65 46