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_defaultgw.exp | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) (limited to 'test/net_defaultgw.exp') 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) match_max 100000 # check ip address -send -- "firejail --net=br0 --ip=10.10.20.5 --defaultgw=10.10.20.2\r" +send -- "firejail --net=br0 --ip=10.10.20.5 --defaultgw=10.10.20.2 --protocol=unix,inet,netlink\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "eth0" @@ -26,40 +26,21 @@ expect { timeout {puts "TESTING ERROR 4\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" + "default via 10.10.20.2 dev eth0" } + +send -- "ip route show\r" expect { timeout {puts "TESTING ERROR 10.2\n";exit} - "10.10.20.2" -} -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" -} -expect { - timeout {puts "TESTING ERROR 10\n";exit} - "home" + "10.10.20.0/29 dev eth0 proto kernel scope link" } sleep 1 -puts "\n" +puts "\nall done\n" -- cgit v1.2.3-54-g00ecf