aboutsummaryrefslogtreecommitdiffstats
path: root/test/net_ip.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_ip.exp
parentgrsecurity: --join, --shutdown (diff)
downloadfirejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.tar.gz
firejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.tar.zst
firejail-54fc70b7bf4e3f74c63d068a873de5a9ddf78330.zip
grsecurity: network testing
Diffstat (limited to 'test/net_ip.exp')
-rwxr-xr-xtest/net_ip.exp33
1 files changed, 7 insertions, 26 deletions
diff --git a/test/net_ip.exp b/test/net_ip.exp
index 5995296c7..f5d487ecc 100755
--- a/test/net_ip.exp
+++ b/test/net_ip.exp
@@ -31,7 +31,7 @@ send -- "exit\r"
31sleep 2 31sleep 2
32 32
33# check loopback 33# check loopback
34send -- "firejail --net=br0 --ip=10.10.20.5\r" 34send -- "firejail --net=br0 --ip=10.10.20.5 --protocol=unix,inet,netlink\r"
35expect { 35expect {
36 timeout {puts "TESTING ERROR 5\n";exit} 36 timeout {puts "TESTING ERROR 5\n";exit}
37 "lo" 37 "lo"
@@ -52,38 +52,19 @@ expect {
52 timeout {puts "TESTING ERROR 9\n";exit} 52 timeout {puts "TESTING ERROR 9\n";exit}
53 "Child process initialized" 53 "Child process initialized"
54} 54}
55sleep 1
55 56
56# check default gateway 57# check default gateway
57send -- "bash\r" 58send -- "ip route show\r"
58sleep 1
59send -- "netstat -rn;pwd\r"
60expect { 59expect {
61 timeout {puts "TESTING ERROR 10.1\n";exit} 60 timeout {puts "TESTING ERROR 10.1\n";exit}
62 "0.0.0.0" 61 "default via 10.10.20.1 dev eth0"
63}
64expect {
65 timeout {puts "TESTING ERROR 10.2\n";exit}
66 "10.10.20.1"
67}
68expect {
69 timeout {puts "TESTING ERROR 10.3\n";exit}
70 "eth0"
71}
72expect {
73 timeout {puts "TESTING ERROR 10.4\n";exit}
74 "10.10.20.0"
75}
76expect {
77 timeout {puts "TESTING ERROR 10.5\n";exit}
78 "0.0.0.0"
79}
80expect {
81 timeout {puts "TESTING ERROR 10.6\n";exit}
82 "eth0"
83} 62}
63
64send -- "ip route show\r"
84expect { 65expect {
85 timeout {puts "TESTING ERROR 10\n";exit} 66 timeout {puts "TESTING ERROR 10\n";exit}
86 "home" 67 "10.10.20.0/29 dev eth0 proto kernel scope link"
87} 68}
88sleep 1 69sleep 1
89 70