aboutsummaryrefslogtreecommitdiffstats
path: root/test/net_defaultgw2.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_defaultgw2.exp
parentgrsecurity: --join, --shutdown (diff)
downloadfirejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.tar.gz
firejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.tar.zst
firejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.zip
grsecurity: network testing
Diffstat (limited to 'test/net_defaultgw2.exp')
-rwxr-xr-xtest/net_defaultgw2.exp47
1 files changed, 11 insertions, 36 deletions
diff --git a/test/net_defaultgw2.exp b/test/net_defaultgw2.exp
index be9b4882a..db14e17cb 100755
--- a/test/net_defaultgw2.exp
+++ b/test/net_defaultgw2.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 --net=br1 --defaultgw=10.10.30.89\r" 8send -- "firejail --net=br0 --net=br1 --defaultgw=10.10.30.89 --protocol=unix,inet,netlink\r"
9expect { 9expect {
10 timeout {puts "TESTING ERROR 0\n";exit} 10 timeout {puts "TESTING ERROR 0\n";exit}
11 "eth1" 11 "eth1"
@@ -14,52 +14,27 @@ expect {
14 timeout {puts "TESTING ERROR 4\n";exit} 14 timeout {puts "TESTING ERROR 4\n";exit}
15 "Child process initialized" 15 "Child process initialized"
16} 16}
17sleep 1
17 18
18# check default gateway 19# check default gateway
19send -- "bash\r" 20send -- "ip route show\r"
20sleep 1
21send -- "netstat -rn;pwd\r"
22expect { 21expect {
23 timeout {puts "TESTING ERROR 10.1\n";exit} 22 timeout {puts "TESTING ERROR 10.1\n";exit}
24 "0.0.0.0" 23 "default via 10.10.30.89 dev eth1"
25} 24}
25
26send -- "ip route show\r"
26expect { 27expect {
27 timeout {puts "TESTING ERROR 10.2\n";exit} 28 timeout {puts "TESTING ERROR 10.2\n";exit}
28 "10.10.30.89" 29 "10.10.20.0/29 dev eth0 proto kernel scope link"
29} 30}
31
32send -- "ip route show\r"
30expect { 33expect {
31 timeout {puts "TESTING ERROR 10.3\n";exit} 34 timeout {puts "TESTING ERROR 10.3\n";exit}
32 "eth1" 35 "10.10.30.0/24 dev eth1 proto kernel scope link"
33}
34expect {
35 timeout {puts "TESTING ERROR 10.4\n";exit}
36 "10.10.20.0"
37}
38expect {
39 timeout {puts "TESTING ERROR 10.5\n";exit}
40 "0.0.0.0"
41}
42expect {
43 timeout {puts "TESTING ERROR 10.6\n";exit}
44 "eth0"
45}
46expect {
47 timeout {puts "TESTING ERROR 10.4\n";exit}
48 "10.10.30.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 "eth1"
57}
58expect {
59 timeout {puts "TESTING ERROR 10\n";exit}
60 "home"
61} 36}
62sleep 1 37sleep 1
63 38
64puts "\n" 39puts "\nall done\n"
65 40