From 54fc70b7bf4e3f74c63d068a873de5a9ddf78330 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 4 Apr 2016 22:01:33 -0400 Subject: grsecurity: network testing --- test/net_ip.exp | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) (limited to 'test/net_ip.exp') 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" sleep 2 # check loopback -send -- "firejail --net=br0 --ip=10.10.20.5\r" +send -- "firejail --net=br0 --ip=10.10.20.5 --protocol=unix,inet,netlink\r" expect { timeout {puts "TESTING ERROR 5\n";exit} "lo" @@ -52,38 +52,19 @@ expect { timeout {puts "TESTING ERROR 9\n";exit} "Child process initialized" } +sleep 1 # check default gateway -send -- "bash\r" -sleep 1 -send -- "netstat -rn;pwd\r" +send -- "ip route show\r" expect { timeout {puts "TESTING ERROR 10.1\n";exit} - "0.0.0.0" -} -expect { - timeout {puts "TESTING ERROR 10.2\n";exit} - "10.10.20.1" -} -expect { - timeout {puts "TESTING ERROR 10.3\n";exit} - "eth0" -} -expect { - timeout {puts "TESTING ERROR 10.4\n";exit} - "10.10.20.0" -} -expect { - timeout {puts "TESTING ERROR 10.5\n";exit} - "0.0.0.0" -} -expect { - timeout {puts "TESTING ERROR 10.6\n";exit} - "eth0" + "default via 10.10.20.1 dev eth0" } + +send -- "ip route show\r" expect { timeout {puts "TESTING ERROR 10\n";exit} - "home" + "10.10.20.0/29 dev eth0 proto kernel scope link" } sleep 1 -- cgit v1.2.3-70-g09d2